File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,13 @@ jobs:
113113 ${{ runner.os }}-composer-
114114
115115 - name : Install Composer dependencies
116- run : composer install --no-interaction --prefer-dist --no-progress
116+ run : |
117+ # For PHP 7.2, we need to ignore platform requirements since some dev dependencies require PHP 7.4+
118+ if [ "${{ matrix.php }}" = "7.2" ]; then
119+ composer install --no-interaction --prefer-dist --no-progress --ignore-platform-req=php
120+ else
121+ composer install --no-interaction --prefer-dist --no-progress
122+ fi
117123
118124 - name : Install system dependencies
119125 run : |
@@ -154,7 +160,13 @@ jobs:
154160 echo "Resolved PHPUnit version: ${PHPUNIT_VERSION}"
155161
156162 # Try to install via composer
157- composer require --dev --no-interaction --prefer-dist --update-with-dependencies "phpunit/phpunit:${PHPUNIT_VERSION}" || {
163+ # For PHP 7.2, use platform override to allow installation of packages with higher PHP requirements
164+ COMPOSER_OPTS=""
165+ if [ "${{ matrix.php }}" = "7.2" ]; then
166+ COMPOSER_OPTS="--ignore-platform-req=php"
167+ fi
168+
169+ composer require --dev --no-interaction --prefer-dist --update-with-dependencies ${COMPOSER_OPTS} "phpunit/phpunit:${PHPUNIT_VERSION}" || {
158170 echo "Composer install failed, attempting PHAR fallback"
159171
160172 # Determine PHAR version
You can’t perform that action at this time.
0 commit comments