Ultimate-Multisite / Ultimate-Multisite/ultimate-multisite

Reduce PHPCS baseline in bounded batches

Open
#1,809 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-dispatch blocked-by:GH#1805 origin:interactive priority:medium quality-debt status:blocked tier:standard
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.json
  • scripts/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

  1. Prioritize production errors over warnings and test-only findings.
  2. Use vendor/bin/phpcbf <files> || true only for fixable groups, then inspect every change.
  3. Hand-fix semantic/security findings and add tests where behavior changes.
  4. 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:php passes against the reduced baseline.
  • pnpm run quality passes.
  • Focused tests pass for behavior-affecting fixes.

Verification

  • vendor/bin/phpcs <changed-files>
  • pnpm run lint:php:baseline
  • pnpm 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.