Skip to content

Add possibility of adding multiple phpstan neon files #8141

@alexander-schranz

Description

@alexander-schranz

Feature Request

As mention in #8140 it would be great to configure the phpstan extension from the rector.php file and not have additonal phpstan or change the own phpstan configuration for it.

Diff

-    $rectorConfig->phpstanConfig(__DIR__ . '/phpstan.neon');
+    $rectorConfig->phpstanConfigs([
+        '__DIR__ . '/phpstan.neon',
+        '__DIR__ . '/vendor/phpstan/phpstan-doctrine/extension.neon',
+        '__DIR__ . '/vendor/phpstan/phpstan-symfony/extension.neon',
+    ]);

I think it would make sense then deprecate phpstanConfig in favor of phpstanConfigs. In cases of rector-symfony, rector-doctrine, ... the docs should be mentioning configuring this. So rector works correctly on symfony services and doctrine entities, ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions