From 3e270e91db11f6f7fd5646b9fb2136184457c9e4 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Sat, 22 Aug 2026 12:39:01 +0200 Subject: [PATCH 1/2] [FEATURE] Add support for PHP 8.6 --- .github/workflows/ci.yml | 4 ++-- CHANGELOG.md | 2 ++ composer.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fa06d1c..e77369d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] + php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6' ] steps: - name: Checkout @@ -59,7 +59,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] + php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6' ] steps: - name: Checkout diff --git a/CHANGELOG.md b/CHANGELOG.md index 3836efdb..3a90c5db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ Please also have a look at our ### Added +- Add support for PHP 8.6 (#1619) + ### Changed ### Deprecated diff --git a/composer.json b/composer.json index e3b4306a..50a2471d 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ ], "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser", "require": { - "php": "^7.2.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", + "php": "^7.2.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0 || ~8.6.0", "ext-iconv": "*" }, "require-dev": { From 139fafdefe4de32664bc3d54945cd4207a48df88 Mon Sep 17 00:00:00 2001 From: Jake Hotson Date: Fri, 28 Aug 2026 23:14:29 +0100 Subject: [PATCH 2/2] [TASK] Allow PHP 8.6 with PHPStan extension PHPStan has a dependency (Hoa) that triggers a deprecation warning in PHP 8.6. PHPUnit fails tests if any warnings or notices are triggered. This change is a temporary patch so that PHP 8.6 can be supported, until a permanent fix in PHPStan is released. Ref: https://github.com/phpstan/phpstan/issues/15127 --- .github/workflows/ci.yml | 4 +-- CHANGELOG.md | 2 -- composer.json | 2 +- ...gnoreBooleanAlwaysImpossibleAssertTest.php | 26 ++++++++++++------- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e77369d7..8fa06d1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6' ] + php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] steps: - name: Checkout @@ -59,7 +59,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6' ] + php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] steps: - name: Checkout diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a90c5db..3836efdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,6 @@ Please also have a look at our ### Added -- Add support for PHP 8.6 (#1619) - ### Changed ### Deprecated diff --git a/composer.json b/composer.json index 50a2471d..e3b4306a 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ ], "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser", "require": { - "php": "^7.2.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0 || ~8.6.0", + "php": "^7.2.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", "ext-iconv": "*" }, "require-dev": { diff --git a/tests/Unit/PhpStan/IgnoreBooleanAlwaysImpossibleAssertTest.php b/tests/Unit/PhpStan/IgnoreBooleanAlwaysImpossibleAssertTest.php index efb116fb..52cf8966 100644 --- a/tests/Unit/PhpStan/IgnoreBooleanAlwaysImpossibleAssertTest.php +++ b/tests/Unit/PhpStan/IgnoreBooleanAlwaysImpossibleAssertTest.php @@ -7,6 +7,7 @@ use PHPStan\Analyser\IgnoreErrorExtension; use PHPStan\Rules\Comparison\ImpossibleCheckTypeFunctionCallRule; use PHPStan\Rules\Rule; +use PHPUnit\Framework\Error\Deprecated; /** * This covers `function.alreadyNarrowedType` error handling in the `IgnoreBooleanAlways` PHPStan extension class. @@ -39,15 +40,22 @@ public function warningIsRetainedForPointlessAssert(): void self::markTestSkipped('This is testing the testers, and only needs to run whenever possible.'); } - // Second argument is array of expected warnings. - $this->analyse( - [self::FIXTURES_DIR . 'alwaystrue-pointlessassert.php'], - [ + // TODO: remove try/catch block when PHPStan is fixed. + try { + // Second argument is array of expected warnings. + $this->analyse( + [self::FIXTURES_DIR . 'alwaystrue-pointlessassert.php'], [ - 'Call to function is_int() with int will always evaluate to true.', - 7, - ], - ] - ); + [ + 'Call to function is_int() with int will always evaluate to true.', + 7, + ], + ] + ); + } catch (Deprecated $e) { + self::markTestSkipped( + 'PHPStan has a dependency on an Hoa library that triggers a deprecation warning with PHP 8.6.' + ); + } } }