Recursively merge php.ini options

This commit is contained in:
Teoh Han Hui 2015-08-14 07:04:59 +00:00
parent 3f33a25a99
commit 9c0173dad0
2 changed files with 14 additions and 2 deletions

View File

@ -3,7 +3,13 @@
{% 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) }}

View File

@ -3,7 +3,13 @@
{% 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) %}