Skip to content

Run the test suite on supported PHP 8.2–8.5 - #48

Merged
aflanagan merged 1 commit into
masterfrom
agent/php-supported-ci-matrix-f308
Nov 4, 2026
Merged

aflanagan merged 1 commit into
masterfrom
agent/php-supported-ci-matrix-f308

Conversation

@aflanagan

Copy link
Copy Markdown
Contributor

The test workflow now runs on every PHP branch that is still supported, instead of a single PHP 7.2 job.

Supported versions

Checked on 2026-11-04 against PHP’s supported versions. endoflife.date/php (updated 2026-10-31) lists the same four branches. 8.1 reached security end of life on 2025-12-31, so it is not included. 8.2 is security-only until 2026-12-31 and is not EOL, so it is included.

Branch Active support until Security support until In this matrix
8.2 2024-12-31 (ended) 2026-12-31 yes
8.3 2025-12-31 (ended) 2027-12-31 yes
8.4 2026-12-31 2028-12-31 yes
8.5 2027-12-31 2029-12-31 yes

CI

  • Old matrix: one job, php-version: 7.2, no strategy matrix.
  • New matrix: 8.2, 8.3, 8.4, 8.5, fail-fast: false.
  • Composer cache key is ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}, and the restore prefix is per PHP version so a miss cannot restore another version’s vendor.
  • actions/checkout v2 → v7. actions/cache v4 → v6. shivammathur/setup-php stays on v2, which is still the current major.

What the suite needed

Released AspectMock 4.1.1 requires php: ^7.4 and the Go! AOP 3.0 container API, so it does not install or run on these versions. goaop/framework 3.1.1 is the release that supports PHP 8.2–8.5. AspectMock commit 5a078a6 (unreleased 5.0-dev) calls that 3.1 API, but its own composer.json still requires unreleased Go! AOP 4, which needs PHP 8.4+. The root composer.json pins that official commit as codeception/aspect-mock 5.0.0-dev and retargets it at goaop/framework ^3.1.1 and goaop/parser-reflection ^3.1.0, so all four jobs resolve the same reflection package (^3.1.0 is php: >=8.2; leaving it unpinned installed 4.1.0 only on 8.4 and 8.5).

PHPUnit moves from ^8.5.52 to ^9.6 because that AspectMock commit requires phpunit/phpunit: ^9.5, and 9.6.38 is the line that still runs on PHP 8.2 through 8.5. The existing tests pass on 9.6 without changes to phpunit.xml or the test files.

friendsofphp/php-cs-fixer stays at ^2.18. v2.19.3 installs on 8.2–8.5 and the workflow does not run it.

For August to decide

require.php is still >=7.2.5. That no longer matches the matrix: 7.2, 7.3, 7.4, 8.0, and 8.1 are EOL and are not tested. Suggestion: raise it to >=8.2 if the package should only claim currently supported PHP. It was left unchanged because the library source was not modified and downstream installs only see require, not require-dev.

Development-only minimum: composer install in this clone now needs PHP >= 8.2. The binding constraints are the pinned AspectMock snapshot (php: ^8.2) and goaop/framework 3.1.1 (php: ^8.2.0). PHPUnit ^9.6 only requires PHP >= 7.3. Composer still solves require-dev when there is no lock file, including for composer install --no-dev, and composer.lock remains gitignored, so a checkout on PHP older than 8.2 cannot install dependencies. Packagist consumers are unaffected: Composer ignores a dependency’s require-dev and repositories.

Open in Web Open in Cursor 

PHP 7.2 is end of life. Matrix the test workflow across the branches php.net still supports, keep fail-fast off, and include the PHP version in the Composer cache key.

PHPUnit 8 and the released AspectMock 4.1.1 cannot run this suite on those versions. Pin AspectMock to the unreleased commit that calls the Go! AOP 3.1 API, and move PHPUnit to 9.6.

Co-authored-by: August Flanagan <aflanagan@users.noreply.github.com>
@aflanagan
aflanagan merged commit d2c802c into master Nov 4, 2026
4 checks passed
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