Skip to content

Deprecate withPhpCsFixerSets(), drop dynamic PHP-CS-Fixer set loading - #66

Merged
TomasVotruba merged 5 commits into
mainfrom
deprecate-php-cs-fixer-sets
Sep 4, 2026
Merged

Deprecate withPhpCsFixerSets(), drop dynamic PHP-CS-Fixer set loading#66
TomasVotruba merged 5 commits into
mainfrom
deprecate-php-cs-fixer-sets

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Loading PHP-CS-Fixer rule sets dynamically was overkill. Prepared sets cover the same ground with a simpler API.

What changed

  • withPhpCsFixerSets() is kept but reduced to a no-op that emits an E_USER_DEPRECATED notice, pointing users to ->withPreparedSets() / ->withSets().
  • Removed the underlying machinery: the $dynamicSets builder state, ECSConfig::dynamicSets(), and the bin/generate-php-cs-fixer-tests.php generator.
  • Dropped the tests and fixtures that exercised the removed dynamic loading.
  • Removed the README section documenting the old withPhpCsFixerSets(perCS20: ...) usage.

Note

The method signature was stripped to no parameters, so existing calls passing named args will need to move to prepared sets.

phpstan, rector, check-cs and the full test suite pass.

https://claude.ai/code/session_01A8hvNrf4ZxWkiEjWxecSAa

Loading PHP-CS-Fixer rule sets dynamically was overkill; prepared sets
cover the same ground. The method stays as a no-op that reports the
deprecation, pointing users to withPreparedSets()/withSets().

Removes the dynamicSets plumbing, ECSConfig::dynamicSets(), the method
generator script, and the tests that exercised the removed loading.

Claude-Session: https://claude.ai/code/session_01A8hvNrf4ZxWkiEjWxecSAa
@TomasVotruba
TomasVotruba merged commit 68393fa into main Sep 4, 2026
8 checks passed
@TomasVotruba
TomasVotruba deleted the deprecate-php-cs-fixer-sets branch September 4, 2026 21:23
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