Skip to content

Inline shared PHP-CS-Fixer rules into the Rules class#39

Merged
alies-dev merged 2 commits into
1.xfrom
inline-php-cs-fixer-rules
Jun 25, 2026
Merged

Inline shared PHP-CS-Fixer rules into the Rules class#39
alies-dev merged 2 commits into
1.xfrom
inline-php-cs-fixer-rules

Conversation

@alies-dev

Copy link
Copy Markdown
Member

Summary

Moves the shared PHP-CS-Fixer rule array from the root .php-cs-fixer-rules.php into Rules::get(), and deletes the root file. The ruleset is now a single PSR-4 autoloaded source with no file-path indirection.

Targets the unreleased 1.x branch, so the (undocumented) raw-require fallback the root file offered can be dropped without a BC concern.

Changes

  • IxDFCodingStandard/PhpCsFixer/Rules.php: rule array inlined into get(); dropped the dirname(__DIR__, 2) require and the now-unneeded static cache. Kept @api and the localheinz reference.
  • Deleted .php-cs-fixer-rules.php.
  • Kept 'api' out of general_phpdoc_annotation_remove so the standard no longer strips the @api tags that mark the supported public surface (caught by running the shared config on this package's own code).

Verification

  • Rules::get() resolves to 149 effective rules via RuleSet.
  • vendor/bin/phpunit: 18 passing.
  • No remaining references to the deleted file.

Move the rule array from the root .php-cs-fixer-rules.php into Rules::get() so
the ruleset is a single PSR-4 autoloaded source with no file-path indirection
(dirname(__DIR__, 2) require). The raw-require fallback the root file provided
was never documented as public API, so this is safe on the unreleased 1.x line.

Also keep '@api' out of general_phpdoc_annotation_remove: the standard was
stripping the @api tags that mark the supported public surface (found by running
the shared config on this package's own code).
@alies-dev alies-dev self-assigned this Jun 25, 2026
@alies-dev alies-dev merged commit f67e45e into 1.x Jun 25, 2026
5 checks passed
@alies-dev alies-dev deleted the inline-php-cs-fixer-rules branch June 25, 2026 13:21
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