Skip to content

Commit 1fe0982

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 724f03c commit 1fe0982

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/tests.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Setup PHP
2929
uses: shivammathur/setup-php@v2
3030
with:
31-
php-version: ${{ matrix.php-versions }}
31+
php-version: ${{ matrix.php-versions == '8.5' && '8.4' || matrix.php-versions }}
3232
extensions: mbstring
3333
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On, display_startup_errors=On, log_errors_max_len=0
3434
coverage: none
@@ -49,5 +49,14 @@ jobs:
4949
composer-options: --ignore-platform-reqs
5050
custom-cache-suffix: $(date -u "+%Y-%m")
5151

52+
- name: "Setup PHP again (PHP 8.5)"
53+
if: ${{ matrix.php-versions == '8.5' }}
54+
uses: shivammathur/setup-php@v2
55+
with:
56+
php-version: ${{ matrix.php-versions }}
57+
extensions: mbstring
58+
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On, display_startup_errors=On, log_errors_max_len=0
59+
coverage: none
60+
5261
- name: Run tests
5362
run: vendor/bin/phpunit tests

0 commit comments

Comments
 (0)