Skip to content

docs: pre-push php-cs-fixer + Rector gotchas - #77

Merged
CybotTM merged 2 commits into
mainfrom
docs/prepush-cs-fixer-rector-gotchas
Jul 24, 2026
Merged

docs: pre-push php-cs-fixer + Rector gotchas#77
CybotTM merged 2 commits into
mainfrom
docs/prepush-cs-fixer-rector-gotchas

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 23, 2026

Copy link
Copy Markdown
Member

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's RemoveDefaultArgumentValueRector strips a trailing argument equal to its parameter default even when the value is meaningful (e.g. a 0 passed 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.cache masks violations locally (use --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.

markdownlint-cli2: 0 issues.

Copilot AI review requested due to automatic review settings July 23, 2026 16:54
@github-actions github-actions Bot added documentation Improvements or additions to documentation skill labels Jul 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

CybotTM added 2 commits July 23, 2026 18:59
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
CybotTM force-pushed the docs/prepush-cs-fixer-rector-gotchas branch from b7ae0a4 to b17b237 Compare July 23, 2026 17:00
@CybotTM
CybotTM requested a review from Copilot July 23, 2026 17:00
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@CybotTM
CybotTM merged commit 11d59de into main Jul 24, 2026
20 of 22 checks passed
@CybotTM
CybotTM deleted the docs/prepush-cs-fixer-rector-gotchas branch July 24, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants