docs: pre-push php-cs-fixer + Rector gotchas - #77
Merged
Conversation
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
RemoveDefaultArgumentValueRector strips a trailing arg equal to its default even when the value is meaningful (e.g. a 0 passed to disable a floor that otherwise defaults to a configured value) — pass it by name to preserve it. Verify lossy-set rewrites against intent rather than applying blind. Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
The .php-cs-fixer.cache masks violations locally (run --using-cache=no for a reliable pre-push check); no_unused_imports deletes an import added before its first usage across staged edits, which CI then fails with class-not-found. Both cost CI round-trips when unknown. Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
CybotTM
force-pushed
the
docs/prepush-cs-fixer-rector-gotchas
branch
from
July 23, 2026 17:00
b7ae0a4 to
b17b237
Compare
|
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.



Distilled from a session retrospective (t3x-nr-vault security-fix sweep) where these cost several CI round-trips.
static-analysis-tools.md(Rector) —SetList::DEAD_CODE'sRemoveDefaultArgumentValueRectorstrips a trailing argument equal to its parameter default even when the value is meaningful (e.g. a0passed to disable a floor that otherwise defaults to a configured value). Pass such an argument by name to preserve it; verify lossy-set rewrites against intent.php-cs-fixer-deprecations.md(new Pre-push usage gotchas section) — the.php-cs-fixer.cachemasks violations locally (use--using-cache=nofor a reliable pre-push check);no_unused_importsdeletes an import added before its first usage across staged edits, which CI then fails with class-not-found.markdownlint-cli2: 0 issues.