From 223e2feb32bf57e8745be475cb7adf9957bb001c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 18 Aug 2026 05:54:57 +0000 Subject: [PATCH 1/4] Add PHP 8.6 to CI workflow matrices Co-authored-by: goetas <776743+goetas@users.noreply.github.com> --- .github/workflows/benchmark.yaml | 1 + .github/workflows/ci.yaml | 1 + .github/workflows/cs.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index 18679da..7a49c2c 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -17,6 +17,7 @@ jobs: php-version: - "7.4" - "8.3" + - "8.6" steps: - name: Checkout code diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2fc0a8b..74a5165 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,6 +22,7 @@ jobs: - "8.3" - "8.4" - "8.5" + - "8.6" steps: - name: Checkout code diff --git a/.github/workflows/cs.yaml b/.github/workflows/cs.yaml index b06399c..4ec9c1f 100644 --- a/.github/workflows/cs.yaml +++ b/.github/workflows/cs.yaml @@ -16,6 +16,7 @@ jobs: matrix: php-version: - "7.4" + - "8.6" steps: - name: Checkout code From 480ea7fe32562c9b9396ba2efb8d2afb7a7385cc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 18 Aug 2026 05:54:45 +0000 Subject: [PATCH 2/4] Guard ReflectionMethod::setAccessible for PHP < 8.5 in serializer tests Co-authored-by: goetas <776743+goetas@users.noreply.github.com> --- test/HTML5/Serializer/OutputRulesTest.php | 4 +++- test/HTML5/Serializer/TraverserTest.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/HTML5/Serializer/OutputRulesTest.php b/test/HTML5/Serializer/OutputRulesTest.php index bee5978..a410894 100644 --- a/test/HTML5/Serializer/OutputRulesTest.php +++ b/test/HTML5/Serializer/OutputRulesTest.php @@ -44,7 +44,9 @@ public function getProtectedMethod($name) { $class = new \ReflectionClass('\Masterminds\HTML5\Serializer\OutputRules'); $method = $class->getMethod($name); - $method->setAccessible(true); + if (\PHP_VERSION_ID < 80500) { + $method->setAccessible(true); + } return $method; } diff --git a/test/HTML5/Serializer/TraverserTest.php b/test/HTML5/Serializer/TraverserTest.php index 09d7142..dd90d17 100644 --- a/test/HTML5/Serializer/TraverserTest.php +++ b/test/HTML5/Serializer/TraverserTest.php @@ -43,7 +43,9 @@ public function getProtectedMethod($name) { $class = new \ReflectionClass('\Masterminds\HTML5\Serializer\Traverser'); $method = $class->getMethod($name); - $method->setAccessible(true); + if (\PHP_VERSION_ID < 80500) { + $method->setAccessible(true); + } return $method; } From 11c18bdae9d5d8fa5e3e878f7a0f09fcf1c75f02 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 18 Aug 2026 06:00:55 +0000 Subject: [PATCH 3/4] Set PHP_CS_FIXER_IGNORE_ENV in CS workflow Co-authored-by: goetas <776743+goetas@users.noreply.github.com> --- .github/workflows/cs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cs.yaml b/.github/workflows/cs.yaml index 4ec9c1f..e1a9eac 100644 --- a/.github/workflows/cs.yaml +++ b/.github/workflows/cs.yaml @@ -28,6 +28,8 @@ jobs: php-version: ${{ matrix.php-version }} - name: cs fix + env: + PHP_CS_FIXER_IGNORE_ENV: "1" run: | wget -q https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.19.3/php-cs-fixer.phar php php-cs-fixer.phar fix --dry-run --diff From 62340a083ef2d62832550f8c68a6880efd12c263 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 18 Aug 2026 06:09:04 +0000 Subject: [PATCH 4/4] Do not run CS fixer on PHP 8.6 Co-authored-by: goetas <776743+goetas@users.noreply.github.com> --- .github/workflows/cs.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cs.yaml b/.github/workflows/cs.yaml index e1a9eac..52b4e33 100644 --- a/.github/workflows/cs.yaml +++ b/.github/workflows/cs.yaml @@ -16,7 +16,6 @@ jobs: matrix: php-version: - "7.4" - - "8.6" steps: - name: Checkout code