Skip to content

feat: add PHP 8.5 and 8.6 compatibility tests and CI matrix entries - #549

Draft
Halleck45 with Copilot wants to merge 1 commit into
masterfrom
copilot/test-phpmetrics-compatibility-php-8-6
Draft

feat: add PHP 8.5 and 8.6 compatibility tests and CI matrix entries#549
Halleck45 with Copilot wants to merge 1 commit into
masterfrom
copilot/test-phpmetrics-compatibility-php-8-6

Conversation

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown

Extends CI coverage and parser compatibility tests to PHP 8.5 (stable since Nov 2025) and PHP 8.6 (in development).

Changes

  • CI matrix — adds 8.5 as a required job; adds 8.6 and nightly with continue-on-error: true since both are pre-stable targets
  • PHP 8.5 fixture — exercises the new pipe operator (|>), the most impactful new syntax
  • PHP 8.6 fixture — exercises readonly properties with default values, which were a fatal error in PHP 8.1–8.5
  • SupportedVersionTest — two new version_compare-gated cases verify the AST parser produces correct metrics for each fixture
// php8.5.pipe.php — new |> operator
class Foo {
    public function bar($a) {
        return $a |> strtolower(...) |> trim(...);
    }
}

// php8.6.readonlydefault.php — readonly with default (previously fatal)
class Foo {
    public readonly string $languageCode = 'en';
    public readonly string $countryCode = 'US';
}

Tests follow the existing SupportedVersionTest pattern and are no-ops on PHP versions below the feature threshold.

Co-authored-by: Halleck45 <1076296+Halleck45@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants