Skip to content

PHPCS: skip public hook names, Faker formatters and generated readme data - #238

Merged
bordoni merged 2 commits into
mainfrom
chore/phpcs-config
Oct 17, 2026
Merged

bordoni merged 2 commits into
mainfrom
chore/phpcs-config

Conversation

@bordoni

@bordoni bordoni commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Config only, each exclusion with its reason in .phpcs.xml.dist:

  • WordPress.NamingConventions.ValidHookName off: the hook names are public API, renaming them would break sites using them.
  • Generic.NamingConventions.ConstructorName.OldStyle off: Faker formatter methods share their class's short name in a namespace, which is not a PHP 4 constructor.
  • Excludes build/, node_modules/ and the generated src/data/readme.php.

Stacked on #237.

@bordoni
bordoni added this pull request to stack #244 October 17, 2026 17:40
@bordoni
bordoni force-pushed the chore/phpcs-config branch 3 times, most recently from 06864d9 to b1d0cb8 Compare October 17, 2026 18:55
Base automatically changed from style/css-lint to main October 17, 2026 18:55
… generated readme data

- ValidHookName: the dotted and slashed fakerpress hook names are public API.
- ConstructorName.OldStyle: false positive inside namespaces (Faker formatter methods).
- Exclude node_modules/, build/ and the generated src/data/readme.php.
@bordoni
bordoni force-pushed the chore/phpcs-config branch from b1d0cb8 to b152149 Compare October 17, 2026 23:17
@bordoni
bordoni merged commit de28c84 into main Oct 17, 2026
4 of 5 checks passed
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.

1 participant