Browse Source

Recursively merge php.ini options

tags/v0.34.0
Teoh Han Hui 9 years ago
parent
commit
9c0173dad0
2 changed files with 14 additions and 2 deletions
  1. +7
    -1
      php/ng/cli/ini.sls
  2. +7
    -1
      php/ng/fpm/config.sls

+ 7
- 1
php/ng/cli/ini.sls View File

{% from "php/ng/ini.jinja" import php_ini %} {% from "php/ng/ini.jinja" import php_ini %}


{% set settings = php.ini.defaults %} {% set settings = php.ini.defaults %}
{% do settings.update(php.cli.ini.settings) %}
{% for key, value in php.cli.ini.settings.iteritems() %}
{% if settings[key] is defined %}
{% do settings[key].update(value) %}
{% else %}
{% do settings.update({key: value}) %}
{% endif %}
{% endfor %}


php_cli_ini: php_cli_ini:
{{ php_ini(php.lookup.cli.ini, php.cli.ini.opts, settings) }} {{ php_ini(php.lookup.cli.ini, php.cli.ini.opts, settings) }}

+ 7
- 1
php/ng/fpm/config.sls View File

{% from "php/ng/ini.jinja" import php_ini %} {% from "php/ng/ini.jinja" import php_ini %}


{% set ini_settings = php.ini.defaults %} {% set ini_settings = php.ini.defaults %}
{% do ini_settings.update(php.fpm.config.ini.settings) %}
{% for key, value in php.fpm.config.ini.settings.iteritems() %}
{% if ini_settings[key] is defined %}
{% do ini_settings[key].update(value) %}
{% else %}
{% do ini_settings.update({key: value}) %}
{% endif %}
{% endfor %}


{% set conf_settings = php.lookup.fpm.defaults %} {% set conf_settings = php.lookup.fpm.defaults %}
{% do conf_settings.update(php.fpm.config.conf.settings) %} {% do conf_settings.update(php.fpm.config.conf.settings) %}

Loading…
Cancel
Save