Skip to content

ci: promote PHPCS from advisory to gating - #28

Merged
rpgmem merged 1 commit into
mainfrom
claude/phpcs-phase4-gating
Apr 16, 2026
Merged

ci: promote PHPCS from advisory to gating#28
rpgmem merged 1 commit into
mainfrom
claude/phpcs-phase4-gating

Conversation

@rpgmem

@rpgmem rpgmem commented Apr 16, 2026

Copy link
Copy Markdown
Owner

Why

Cleanup sprints #25-#27 reduced PHPCS violations from 88,399 to ~1,295. The check can now gate merges without blocking legitimate work.

What changed

  • Removed continue-on-error: true from PHPCS job
  • Removed || true from phpcs command — non-zero exit now fails the check
  • Updated CONTRIBUTING.md to reflect gating status

How it works

PHPCS only scans PHP files changed in the PR. If a PR touches a file with pre-existing violations (~1,295 remain in legacy files, mostly missing docblocks), those violations block the merge. This incentivizes gradual cleanup as files are touched.

After merge — user action

Add WPCS on changed PHP files as a required check in Settings → Rules (same ruleset where you added PHPUnit 8.1-8.4).

Test plan

  • CI passes (this PR only touches workflow + docs, no PHP changes → PHPCS skips)
  • After merge, verify a PR touching a clean PHP file passes WPCS
  • After merge, add check to branch protection ruleset

Cleanup sprints #25-#27 reduced PHPCS violations from 88,399 to ~1,295.
The remaining violations are in untouched legacy files (mostly missing
docblocks) and only surface when a PR touches those files.

- Removed continue-on-error: true from PHPCS job
- Removed || true from phpcs command so non-zero exit fails the check
- Updated CONTRIBUTING.md to reflect gating status
@rpgmem
rpgmem merged commit daa0556 into main Apr 16, 2026
12 checks passed
@rpgmem
rpgmem deleted the claude/phpcs-phase4-gating branch April 16, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants