forked from laminas/laminas-continuous-integration-action
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use development php.ini settings
This patch updates the base `php.ini` for each PHP version to provide the following develoment values (assuming that the version supports the setting): - `zend.exception_ignore_args = Off` - `zend.exception_string_param_max_len = 15` - `error_reporting = E_ALL` - `display_errors = On` - `display_startup_errors = On` - `mysqlnd.collect_memory_statistics = On` - `zend.assertions = 1` Fixes laminas#36 Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
- Loading branch information
1 parent
b483292
commit abca2c7
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
declare -a SUBSTITUTIONS | ||
|
||
SUBSTITUTIONS+=('s/zend.exception_ignore_args ?= ?(On|Off)/zend.exception_ignore_args = Off/') | ||
SUBSTITUTIONS+=('s/zend.exception_string_param_max_len ?= ?[0-9]+/zend.exception_string_param_max_len = 15/') | ||
SUBSTITUTIONS+=('s/error_reporting ?= ?[A-Z_~ &]+/error_reporting = E_ALL/') | ||
SUBSTITUTIONS+=('s/display_errors ?= ?(On|Off)/display_errors = On/') | ||
SUBSTITUTIONS+=('s/display_startup_errors ?= ?(On|Off)/display_startup_errors = On/') | ||
SUBSTITUTIONS+=('s/mysqlnd.collect_memory_statistics ?= ?(On|Off)/mysqlnd.collect_memory_statistics = On/') | ||
SUBSTITUTIONS+=('s/zend.assertions ?= ?(-1|1)/zend.assertions = 1/') | ||
SUBSTITUTIONS+=('s/opcache.huge_code_pages ?= ?(0|1)/opcache.huge_code_pages = 0/') | ||
|
||
for PHP_VERSION in 5.6 7.0 7.1 7.2 7.3 7.4 8.0;do | ||
INI_FILE="/etc/php/${PHP_VERSION}/cli/php.ini" | ||
for SUBSTITUTION in "${SUBSTITUTIONS[@]}";do | ||
sed --in-place -E -e "${SUBSTITUTION}" "${INI_FILE}" | ||
done | ||
done |