ci(MSP-5160): add PHP 8.6 to the CI matrix - #703
Open
Maks Rafalko (maks-rafalko) wants to merge 3 commits into
Open
ci(MSP-5160): add PHP 8.6 to the CI matrix#703Maks Rafalko (maks-rafalko) wants to merge 3 commits into
Maks Rafalko (maks-rafalko) wants to merge 3 commits into
Conversation
PHP 8.6 is still a nightly/pre-release build ahead of GA, so its matrix legs are marked continue-on-error (with fail-fast disabled) to avoid blocking merges while tracking the moving pre-release, following the pattern from Lendable/doctrine-migrations-extensions#177. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
PHP 8.6 appends "near location X:Y" to json_decode()'s underlying error messages (e.g. "Syntax error" -> "Syntax error near location 1:34"), which DeserializationFailed passes through verbatim. Match the message with a regex that accepts the optional suffix so the same assertion holds across PHP 8.4/8.5 and the 8.6 nightly build. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…PHP 8.6 infection/infection's own constraint on thecodingmachine/safe (^v3.0) lets `--prefer-lowest` resolve v3.0.0, whose generated function-wrapper dispatcher has no PHP 8.6 branch, so none of the Safe\* functions get defined and infection crashes with "Call to undefined function Safe\getcwd()". PHP 8.6 support landed in safe v3.4.0, so pin our own require-dev floor there to force that version under lowest deps too. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
| "phpunit/phpunit": "^13.2.6", | ||
| "rector/rector": "^2.5.7" | ||
| "rector/rector": "^2.5.7", | ||
| "thecodingmachine/safe": "^3.4.0" |
Contributor
Author
There was a problem hiding this comment.
without this, the build for PHP 8.6 lowest deps fails.
This is because infection/infection depends on thecodingmachine/safe:^3.0.0, but 3.0.0 (lowest) version doesn't have functions exported to 8.6 folder, while 3.4.0 (highest) does have it.
See https://github.com/thecodingmachine/safe/tree/v3.4.0/generated
The way how it works:
if (str_starts_with(PHP_VERSION, "8.5.")) {
require_once __DIR__ . '/8.5/filesystem.php';
}but there is not folder for 8.6.
The fix is to require dev(!) package here so we lock the minimum to 3.4.0. This will not impact consumers of this library as the dev package is ignored during resolving of the packages.
Maks Rafalko (maks-rafalko)
marked this pull request as ready for review
August 13, 2026 22:31
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.
Why
Adds PHP 8.6 to the CI matrix. PHP 8.6 is still a nightly/pre-release build ahead of GA (
shivammathur/setup-phpinstalls it as a nightly build of8.6.0-dev), so the 8.6 legs are markedcontinue-on-errorandfail-fastis disabled so a flaky pre-release build doesn't block merges or cancel the other legs.Unlike that repo (which pins a container image tag), this repo uses
shivammathur/setup-php, which supports installing PHP 8.6 directly via its nightly-build support - no image/tag pinning needed.