feat(composer): make dependencies configurable

This commit is contained in:
Alexander Weidinger 2020-11-08 22:10:03 +01:00 committed by Imran Iqbal
parent bf6a7582b7
commit d727b15557
No known key found for this signature in database
GPG Key ID: 6D8629439D2B7819
3 changed files with 22 additions and 8 deletions

View File

@ -12,14 +12,9 @@
include: include:
- php - php
{% if grains['os_family'] == 'FreeBSD' %} {%- for module in php.lookup.get('composer', {}).get('required_modules', []) %}
- php.filter - php.{{ module }}
- php.hash {%- endfor %}
- php.json
- php.mbstring
- php.openssl
- php.phar
{% endif %}
get-composer: get-composer:
file.managed: file.managed:

View File

@ -3102,6 +3102,15 @@
'cli': { 'cli': {
'ini': '/usr/local/etc/php.ini' 'ini': '/usr/local/etc/php.ini'
}, },
'composer': {
'required_modules': [
'filter',
'json',
'mbstring',
'openssl',
'phar',
],
},
'pkgs': { 'pkgs': {
'apache2': 'mod_php' + freebsd_php_version, 'apache2': 'mod_php' + freebsd_php_version,
'composer_bin': 'composer', 'composer_bin': 'composer',

View File

@ -74,6 +74,16 @@ php:
cli: cli:
ini: /location/of/php-cli/php.ini ini: /location/of/php-cli/php.ini
# php.composer
# Some OS need modules to be installed
composer:
required_modules:
- filter
- json
- mbstring
- openssl
- phar
# php-fpm settings # php-fpm settings
fpm: fpm: