Skip to content

Commit ac0d22e

Browse files
committed
GH Actions: apply work-around for testing against PHP 8.5
Currently every single `composer install` on PHP 8.5 fails due to a deprecation notice coming from a Composer dependency during the reading of the `composer.json` file. While it is expected that this will be fixed soonish (fix is already available in the dependency, we're just waiting for a new release of both the dependency as well as of Composer), I rather not have the red crosses on every single PR while working on getting PHPCS 4.0 released. So, this commit adds a temporary work-around which should allow the tests to run against PHP 8.5 again. This should also allow us to monitor if any of the other deprecation PRs which have gone into PHP 8.5 cause issues for PHPCS. Once a new version of Composer has been released, we should be able to revert this commit.
1 parent d7a7cca commit ac0d22e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ jobs:
199199
- name: Install PHP
200200
uses: shivammathur/setup-php@v2
201201
with:
202-
php-version: ${{ matrix.php }}
202+
php-version: ${{ matrix.php == '8.5' && '8.4' || matrix.php }}
203203
ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
204204
coverage: none
205205

@@ -229,6 +229,14 @@ jobs:
229229
composer-options: ${{ matrix.php == '8.5' && '--ignore-platform-req=php+' || '' }}
230230
custom-cache-suffix: $(date -u "+%Y-%m")
231231

232+
- name: "Install PHP again (PHP 8.5)"
233+
if: ${{ matrix.php == '8.5' }}
234+
uses: shivammathur/setup-php@v2
235+
with:
236+
php-version: ${{ matrix.php }}
237+
ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
238+
coverage: none
239+
232240
- name: 'PHPCS: set the path to PHP'
233241
run: php "bin/phpcs" --config-set php_path php
234242

0 commit comments

Comments
 (0)