@@ -79,12 +79,9 @@ function checkout {
79
79
80
80
function composer_install {
81
81
local DEPS=$1
82
- local PHP=$2
83
- local IGNORE_PLATFORM_REQS_ON_8=$3
82
+ local IGNORE_PHP_PLATFORM_REQUIREMENT=$2
84
83
local COMPOSER_ARGS=" --ansi --no-interaction --no-progress --prefer-dist"
85
- if [[ " ${IGNORE_PLATFORM_REQS_ON_8} " == " yes" && " ${PHP} " =~ ^8. ]]; then
86
- # TODO: Remove this when it's not an issue, and/or provide a config
87
- # option to disable the behavior.
84
+ if [[ " ${IGNORE_PHP_PLATFORM_REQUIREMENT} " == " true" ]]; then
88
85
COMPOSER_ARGS=" ${COMPOSER_ARGS} --ignore-platform-req=php"
89
86
fi
90
87
@@ -150,6 +147,17 @@ EXTENSIONS=$(echo "${JOB}" | jq -r ".extensions // [] | map(\"php${PHP}-\"+.) |
150
147
INI=$( echo " ${JOB} " | jq -r ' .ini // [] | join("\n")' )
151
148
DEPS=$( echo " ${JOB} " | jq -r ' .dependencies // "locked"' )
152
149
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' )
150
+ IGNORE_PHP_PLATFORM_REQUIREMENT=$( echo " ${JOB} " | jq -r ' .ignore_php_platform_requirement' )
151
+
152
+ # Old matrix generation
153
+ if [ " ${IGNORE_PHP_PLATFORM_REQUIREMENT} " == " null" ]; then
154
+ IGNORE_PHP_PLATFORM_REQUIREMENT=" false"
155
+
156
+ # Provide BC compatibility
157
+ if [ " ${IGNORE_PLATFORM_REQS_ON_8} " == " yes" ] && [[ " ${PHP} " =~ ^8 ]]; then
158
+ IGNORE_PHP_PLATFORM_REQUIREMENT=" true"
159
+ fi
160
+ fi
153
161
154
162
if [[ " ${EXTENSIONS} " != " " ]]; then
155
163
/scripts/extensions.sh " ${PHP} " " ${EXTENSIONS} "
@@ -168,7 +176,8 @@ php -m
168
176
if [[ " ${GITHUB_TOKEN} " != " " ]]; then
169
177
composer config --global github-oauth.github.com " ${GITHUB_TOKEN} "
170
178
fi
171
- composer_install " ${DEPS} " " ${PHP} " " ${IGNORE_PLATFORM_REQS_ON_8} "
179
+
180
+ composer_install " ${DEPS} " " ${IGNORE_PHP_PLATFORM_REQUIREMENT} "
172
181
173
182
if [[ " ${COMMAND} " =~ phpunit ]]; then
174
183
echo " Setting up PHPUnit problem matcher"
0 commit comments