Ultimate-Multisite / Ultimate-Multisite/ultimate-multisite
Reduce PHPCS baseline in bounded batches
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 214
- Forks
- 86
- Avg merge
- 5h 29m
- Merged PRs (30d)
- 60
Description
What
Reduce the PHPCS baseline introduced by #1805, currently tracking 1,289 errors and 590 warnings by file and sniff.
Why
The ratchet blocks new violations but existing coding-standard debt still obscures defects and slows release review.
Tier
tier:standard — the work spans production, tests, tooling, and legacy compatibility files and should be delivered in bounded batches.
Files
phpcs-baseline.jsonscripts/phpcs-baseline.php.phpcs.xml.dist- Files and sniffs named in
phpcs-baseline.json
Reference pattern
Fix a coherent sniff or directory, run PHPCS on the changed files, then deliberately regenerate the exact baseline with pnpm run lint:php:baseline. Do not weaken the coding standard or broadly exclude runtime code.
Implementation steps
- Prioritize production errors over warnings and test-only findings.
- Use
vendor/bin/phpcbf <files> || trueonly for fixable groups, then inspect every change. - Hand-fix semantic/security findings and add tests where behavior changes.
- Regenerate the baseline and confirm counts only decrease.
Acceptance criteria
- Baseline counts decrease materially.
- No broad production exclusion or reduced severity is added.
-
pnpm run lint:phppasses against the reduced baseline. -
pnpm run qualitypasses. - Focused tests pass for behavior-affecting fixes.
Verification
vendor/bin/phpcs <changed-files>pnpm run lint:php:baselinepnpm run quality
Dependency
Blocked by #1805; begin after PR #1806 merges.
aidevops.sh v3.32.317 plugin for OpenCode v1.18.29 with gpt-5.6-sol spent 4h 26m and 539,830 tokens on this with the user in an interactive session.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Wait for PR #1806 to merge, then inspect phpcs-baseline.json alongside scripts/phpcs-baseline.php and .phpcs.xml.dist. Choose one coherent sniff or directory, run PHPCS on the affected files, and use pnpm run lint:php:baseline to regenerate the baseline. Done means the counts decrease without exclusions or severity changes, pnpm run lint:php and pnpm run quality pass, and focused tests pass where behavior changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100