File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ The JSON string should represent an object with the following information:
18
18
" php.ini directives, one per element; e.g. 'memory_limit=-1'"
19
19
],
20
20
"dependencies" : " dependencies to test against; one of lowest, locked, latest" ,
21
+ "ignore_platform_reqs_on_8" : " (boolean; OPTIONAL) Whether or not to ignore platform requirements on PHP 8; defaults to true" ,
21
22
"command" : " command to run to perform the check (empty in case you dont want to excecute any command)"
22
23
}
23
24
```
Original file line number Diff line number Diff line change @@ -75,8 +75,9 @@ function checkout {
75
75
function composer_install {
76
76
local DEPS=$1
77
77
local PHP=$2
78
+ local IGNORE_PLATFORM_REQS_ON_8=$3
78
79
local COMPOSER_ARGS=" --ansi --no-interaction --no-progress --prefer-dist"
79
- if [[ " ${PHP} " =~ ^8. ]]; then
80
+ if [[ " ${IGNORE_PLATFORM_REQS_ON_8} " == " yes " && " ${ PHP}" =~ ^8. ]]; then
80
81
# TODO: Remove this when it's not an issue, and/or provide a config
81
82
# option to disable the behavior.
82
83
COMPOSER_ARGS=" ${COMPOSER_ARGS} --ignore-platform-req=php"
140
141
EXTENSIONS=$( echo " ${JOB} " | jq -r " .extensions // [] | map(\" php${PHP} -\" +.) | join(\" \" )" )
141
142
INI=$( echo " ${JOB} " | jq -r ' .ini // [] | join("\n")' )
142
143
DEPS=$( echo " ${JOB} " | jq -r ' .dependencies // "locked"' )
144
+ IGNORE_PLATFORM_REQS_ON_8=$( echo " ${JOB} " | jq -r ' if has("ignore_platform_reqs_8") | not then "yes" elif .ignore_platform_reqs_8 then "yes" else "no" end' )
143
145
144
146
if [[ " ${EXTENSIONS} " != " " ]]; then
145
147
ENABLE_SQLSRV=false
@@ -171,7 +173,7 @@ echo "PHP version: $(php --version)"
171
173
echo " Installed extensions:"
172
174
php -m
173
175
174
- composer_install " ${DEPS} " " ${PHP} "
176
+ composer_install " ${DEPS} " " ${PHP} " " ${IGNORE_PLATFORM_REQS_ON_8} "
175
177
176
178
if [[ " ${COMMAND} " =~ phpunit ]]; then
177
179
echo " Setting up PHPUnit problem matcher"
You can’t perform that action at this time.
0 commit comments