Repository navigation
Run the test suite on supported PHP 8.2–8.5 - #48
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
CI
php-version: 7.2, nostrategymatrix.8.2,8.3,8.4,8.5,fail-fast: false.${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}, and the restore prefix is per PHP version so a miss cannot restore another version’svendor.actions/checkoutv2 → v7.actions/cachev4 → v6.shivammathur/setup-phpstays on v2, which is still the current major.What the suite needed
Released AspectMock 4.1.1 requires
php: ^7.4and the Go! AOP 3.0 container API, so it does not install or run on these versions.goaop/framework3.1.1 is the release that supports PHP 8.2–8.5. AspectMock commit5a078a6(unreleased 5.0-dev) calls that 3.1 API, but its owncomposer.jsonstill requires unreleased Go! AOP 4, which needs PHP 8.4+. The rootcomposer.jsonpins that official commit ascodeception/aspect-mock5.0.0-devand retargets it atgoaop/framework^3.1.1 andgoaop/parser-reflection^3.1.0, so all four jobs resolve the same reflection package (^3.1.0isphp: >=8.2; leaving it unpinned installed 4.1.0 only on 8.4 and 8.5).PHPUnit moves from
^8.5.52to^9.6because that AspectMock commit requiresphpunit/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 tophpunit.xmlor the test files.friendsofphp/php-cs-fixerstays at^2.18. v2.19.3 installs on 8.2–8.5 and the workflow does not run it.For August to decide
require.phpis 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.2if the package should only claim currently supported PHP. It was left unchanged because the library source was not modified and downstream installs only seerequire, notrequire-dev.Development-only minimum:
composer installin this clone now needs PHP >= 8.2. The binding constraints are the pinned AspectMock snapshot (php: ^8.2) andgoaop/framework3.1.1 (php: ^8.2.0). PHPUnit^9.6only requires PHP >= 7.3. Composer still solvesrequire-devwhen there is no lock file, including forcomposer install --no-dev, andcomposer.lockremains gitignored, so a checkout on PHP older than 8.2 cannot install dependencies. Packagist consumers are unaffected: Composer ignores a dependency’srequire-devandrepositories.