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:
- php
{% if grains['os_family'] == 'FreeBSD' %}
- php.filter
- php.hash
- php.json
- php.mbstring
- php.openssl
- php.phar
{% endif %}
{%- for module in php.lookup.get('composer', {}).get('required_modules', []) %}
- php.{{ module }}
{%- endfor %}
get-composer:
file.managed:

View File

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

View File

@ -74,6 +74,16 @@ php:
cli:
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
fpm: