docs(static-analysis): note php-cs-fixer CI/PHP-version parity#63
Merged
Conversation
php-cs-fixer applies PHP-version-specific fixers, so a newer local PHP can report a file clean while CI running on the project's pinned, older PHP rewrites it and fails the style gate (seen in practice: `fn (` passed local PHP 8.5 but CI's PHP 8.2 demanded `fn(`). Document running quality gates via the project's own runner (make / composer script / Docker) at CI's PHP version in the static-analysis-tools reference, and add an eval covering the diagnosis. SKILL.md is unchanged (stays under the 500-word cap). Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Copilot stopped reviewing on behalf of
CybotTM due to an error
June 18, 2026 09:55
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.



What
Adds a "Run the toolchain the way CI does (version parity)" section to
references/static-analysis-tools.md, plus a covering eval.Why
php-cs-fixer applies PHP-version-specific fixers: which rules run and how
they format depend on the PHP version the binary executes under. So
php vendor/bin/php-cs-fixer fix --dry-runon a newer local PHP can report afile clean while CI — running the style gate on the project's pinned, older PHP
— rewrites it and fails. Observed in practice: a closure formatted
fn (passedlocal PHP 8.5 but CI's PHP 8.2 demanded
fn(, costing a red gate and aforce-push.
Change
(
make code-style/make phpstan, a composer script, or a Docker runner) sothe PHP version matches CI; if calling the binary directly, run it under CI's
PHP version; note that
PHP_CS_FIXER_IGNORE_ENVonly silences the warning.cs-fixer-ci-version-parityasserting the diagnosis + therun-via-CI-toolchain remedy.
SKILL.mdis unchanged and stays under the 500-word cap (guidance lives in thealready-referenced
static-analysis-tools.md).