@@ -9,11 +9,6 @@ option_settings:
99 display_errors: "Off"
1010 max_execution_time: 60
1111
12- packages:
13- yum:
14- php71-imap: []
15- php71-pecl-redis: []
16-
1712files:
1813 "/etc/php.d/z_project.ini":
1914 mode: "000644"
3025 [opcache]
3126 opcache.enable = On
3227 opcache.enable_cli = On
28+ opcache.file_cache = "/tmp/opcache"
3329 opcache.validate_timestamps = On
3430 opcache.revalidate_freq = 300
3531 opcache.memory_consumption = 256
@@ -55,26 +51,50 @@ files:
5551 extension=mailparse.so
5652
5753container_commands:
58- 50_install_imap:
59- test: '[ ! -f /usr/lib64/php/7.1/modules/imap.so ] && echo "imap is not installed"'
60- command: sudo yum install php71-imap -y
61- 51_install_mailparse:
62- test: '[ ! -f /usr/lib64/php/7.1/modules/mailparse.so ] && echo "mailparse is not installed"'
54+
55+ # PHP 7.1 Requirements...
56+ 50_php71_install_yum_packages:
57+ test: '[ $(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) -eq "71" ]'
58+ command: |
59+ sudo yum install php71-imap -y
60+ sudo yum install php71-pecl-redis -y
61+ 51_php71_install_mailparse:
62+ test: '[ $(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) -eq "71" && ! -f /usr/lib64/php/7.1/modules/mailparse.so ]'
6363 command: |
6464 sudo pecl7 install --force mailparse
6565 sudo -u root bash -c "sed '/extension=\"mailparse.so\"/d' /etc/php.ini > /etc/php.ini"
6666 # Mautic currently uses an older version of Doctrine which lacks APCu compatibility.
6767 # Installing APC Backward Compatibility allows the old APC functions to use APCu instead without modifying Mautic.
68- 52_install_apcu_bc :
69- test: '[ ! -f /usr/lib64/php/7.1/modules/apc.so ] && echo "APC backward compatibility is not installed" '
68+ 52_php71_install_apcu_bc :
69+ test: '[ $(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) -eq "71" && ! -f /usr/lib64/php/7.1/modules/apc.so ]'
7070 command: |
7171 no | sudo pecl7 install --force apcu_bc-beta
7272 sudo rm -rf /etc/php-7.1.d/40-apcu.ini
7373 sudo -u root bash -c "sed '/extension=\"apc.so\"/d' /etc/php.ini > /etc/php.ini"
7474 sudo -u root bash -c "sed '/extension=\"apcu.so\"/d' /etc/php.ini > /etc/php.ini"
75- # A restart of apache is not typically necessary.
76- # 52_restart_httpd:
77- # command: sudo service httpd restart
78- 53_redis_configure:
75+
76+ # PHP 7.2 Requirements...
77+ 52_php72_install_yum_packages:
78+ test: '[ $(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) -eq "72" ]'
79+ command: |
80+ sudo yum install php72-imap -y
81+ sudo yum install php72-pecl-redis -y
82+ 53_php72_install_mailparse:
83+ test: '[ $(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) -eq "72" && ! -f /usr/lib64/php/7.2/modules/mailparse.so ]'
84+ command: |
85+ sudo pecl7 install --force mailparse
86+ sudo -u root bash -c "sed '/extension=\"mailparse.so\"/d' /etc/php.ini > /etc/php.ini"
87+ # Mautic currently uses an older version of Doctrine which lacks APCu compatibility.
88+ # Installing APC Backward Compatibility allows the old APC functions to use APCu instead without modifying Mautic.
89+ 54_php72_install_apcu_bc:
90+ test: '[ $(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) -eq "72" && ! -f /usr/lib64/php/7.2/modules/apc.so ]'
91+ command: |
92+ no | sudo pecl7 install --force apcu_bc-beta
93+ sudo rm -rf /etc/php-7.2.d/40-apcu.ini
94+ sudo -u root bash -c "sed '/extension=\"apc.so\"/d' /etc/php.ini > /etc/php.ini"
95+ sudo -u root bash -c "sed '/extension=\"apcu.so\"/d' /etc/php.ini > /etc/php.ini"
96+
97+ # Redis for all versions of PHP.
98+ 55_redis_configure:
7999 command: bash scripts/redis-start.sh
80100 ignoreErrors: true
0 commit comments