Summary
PR #96 repointed the active lint gate (phpcs.xml, used by composer phpcs) from the full WordPress procedural standard to PSR-12 + a curated set of WordPress security/i18n sniffs, because the codebase is intentionally PSR-4 / PSR-12.
However, the .dist siblings were intentionally left untouched in that PR and still reference the old WordPress standard:
phpcbf.xml.dist — used by composer phpcbf (vendor/bin/phpcbf --standard=phpcbf.xml.dist ... src/)
phpcs.xml.dist — used by composer lint (vendor/bin/phpcs --standard=phpcs.xml.dist ... src/)
Why this matters
Running composer phpcbf, composer lint:fix, or the auto-fix CI job (.github/workflows/code-quality.yml) against the stale .dist standard will actively re-mangle modern code the way the original gate did:
[] → array()
- forcing
final on classes
- Yoda conditions, tabs-vs-spaces churn
- snake_case renames of the public PSR-4 API
That would undo the cleanup in #96 and reintroduce thousands of false "violations."
Proposed work
- Bring
phpcs.xml.dist and phpcbf.xml.dist in line with the realigned phpcs.xml (PSR-12 base + the kept WordPress Security/DB/VIPMinimum/I18n/PrefixAllGlobals sniffs; drop the WP naming/filename/array-syntax conventions).
- Decide whether the
.dist files should simply <rule ref="phpcs.xml"/>-style inherit, or be collapsed so there is a single source of truth for the standard.
- Re-verify
composer phpcbf / composer lint:fix produce no destructive diffs on a clean src/ tree.
- Confirm the
auto-fix job in code-quality.yml (runs phpcbf/phpfix/rector:fix on pushes to universe) is safe against the aligned standard.
Acceptance criteria
composer lint:fix on a clean tree yields only formatting that the PSR-12 gate also wants — no array() conversions, no forced final, no API renames.
composer lint and composer phpcs agree (same effective standard).
Scope note
Out of scope for PR #96 (which deliberately changed only the active read-only gate). Tracked here as the follow-up called out in that PR's "Out of scope" section.
https://claude.ai/code/session_017eY7AtjnwGHErQbDNzGxzt
Summary
PR #96 repointed the active lint gate (
phpcs.xml, used bycomposer phpcs) from the full WordPress procedural standard to PSR-12 + a curated set of WordPress security/i18n sniffs, because the codebase is intentionally PSR-4 / PSR-12.However, the
.distsiblings were intentionally left untouched in that PR and still reference the old WordPress standard:phpcbf.xml.dist— used bycomposer phpcbf(vendor/bin/phpcbf --standard=phpcbf.xml.dist ... src/)phpcs.xml.dist— used bycomposer lint(vendor/bin/phpcs --standard=phpcs.xml.dist ... src/)Why this matters
Running
composer phpcbf,composer lint:fix, or theauto-fixCI job (.github/workflows/code-quality.yml) against the stale.diststandard will actively re-mangle modern code the way the original gate did:[]→array()finalon classesThat would undo the cleanup in #96 and reintroduce thousands of false "violations."
Proposed work
phpcs.xml.distandphpcbf.xml.distin line with the realignedphpcs.xml(PSR-12 base + the kept WordPressSecurity/DB/VIPMinimum/I18n/PrefixAllGlobalssniffs; drop the WP naming/filename/array-syntax conventions)..distfiles should simply<rule ref="phpcs.xml"/>-style inherit, or be collapsed so there is a single source of truth for the standard.composer phpcbf/composer lint:fixproduce no destructive diffs on a cleansrc/tree.auto-fixjob incode-quality.yml(runsphpcbf/phpfix/rector:fixon pushes touniverse) is safe against the aligned standard.Acceptance criteria
composer lint:fixon a clean tree yields only formatting that the PSR-12 gate also wants — noarray()conversions, no forcedfinal, no API renames.composer lintandcomposer phpcsagree (same effective standard).Scope note
Out of scope for PR #96 (which deliberately changed only the active read-only gate). Tracked here as the follow-up called out in that PR's "Out of scope" section.
https://claude.ai/code/session_017eY7AtjnwGHErQbDNzGxzt