From 0c2a74c40c699ca14157446a17a494f894a31444 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Aug 2026 18:05:50 +0000 Subject: [PATCH] feat: add PHP 8.5 and 8.6 compatibility tests and CI matrix entries Co-authored-by: Halleck45 <1076296+Halleck45@users.noreply.github.com> --- .github/workflows/ci.yml | 5 ++++- tests/Component/Ast/SupportedVersionTest.php | 6 ++++++ tests/Component/Ast/dataset/php8.5.pipe.php | 9 +++++++++ tests/Component/Ast/dataset/php8.6.readonlydefault.php | 7 +++++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 tests/Component/Ast/dataset/php8.5.pipe.php create mode 100644 tests/Component/Ast/dataset/php8.6.readonlydefault.php diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76b771f6..c82c1985 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,9 +11,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4] + php-version: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5] include: + - php-version: 8.6 + continue-on-error: true - php-version: nightly + continue-on-error: true fail-fast: false services: diff --git a/tests/Component/Ast/SupportedVersionTest.php b/tests/Component/Ast/SupportedVersionTest.php index 3d9ea49b..d493d5af 100644 --- a/tests/Component/Ast/SupportedVersionTest.php +++ b/tests/Component/Ast/SupportedVersionTest.php @@ -64,6 +64,12 @@ public static function providesCases() if (version_compare(PHP_VERSION, '8.4.0', '>=')) { $cases['php8.4.propertyhook'] = ['php8.4.propertyhook', 'Foo', ['nbMethods' => 0, 'number_operands_unique' => 2]]; } + if (version_compare(PHP_VERSION, '8.5.0', '>=')) { + $cases['php8.5.pipe'] = ['php8.5.pipe', 'Foo', ['nbMethods' => 1]]; + } + if (version_compare(PHP_VERSION, '8.6.0', '>=')) { + $cases['php8.6.readonlydefault'] = ['php8.6.readonlydefault', 'Foo', ['nbMethods' => 0]]; + } return $cases; } diff --git a/tests/Component/Ast/dataset/php8.5.pipe.php b/tests/Component/Ast/dataset/php8.5.pipe.php new file mode 100644 index 00000000..9500268f --- /dev/null +++ b/tests/Component/Ast/dataset/php8.5.pipe.php @@ -0,0 +1,9 @@ + strtolower(...) |> trim(...); + } +} diff --git a/tests/Component/Ast/dataset/php8.6.readonlydefault.php b/tests/Component/Ast/dataset/php8.6.readonlydefault.php new file mode 100644 index 00000000..8c3ef015 --- /dev/null +++ b/tests/Component/Ast/dataset/php8.6.readonlydefault.php @@ -0,0 +1,7 @@ +