Skip to content

Auto-load all rule sets, toggle them via symplify.* parameters - #319

Merged
TomasVotruba merged 1 commit into
mainfrom
toggle-symfony-doctrine-phpunit-sets
Sep 24, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
toggle-symfony-doctrine-phpunit-sets

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

All rule sets are now auto-loaded via phpstan/extension-installer - no includes: needed. Each set is toggled by a parameter:

parameters:
    symplify:
        # enabled by default
        naming: true
        complexity: true
        configurable: true
        static: true
        symfony: true
        symfonyConfig: true
        doctrine: true
        phpunit: true

        # disabled by default
        mocks: false
        ctor: false
  • symfony-rules.neon, symfony-config-rules.neon, doctrine-rules.neon and phpunit-rules.neon switched from rules: to conditionalTags with new symfony, symfonyConfig, doctrine, phpunit parameters
  • code-complexity, configurable, static, symfony, symfony-config, doctrine and phpunit sets added to extra.phpstan.includes
  • rector-rules.neon stays opt-in

Upgrade note: projects that included these sets manually must remove those includes: lines - PHPStan reports the duplicate include with a clear message.

@TomasVotruba
TomasVotruba merged commit 01ab4a3 into main Sep 24, 2026
8 checks passed
@TomasVotruba
TomasVotruba deleted the toggle-symfony-doctrine-phpunit-sets branch September 24, 2026 12:53
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