From 474d0dc82dfeaa8ac09a87224e5aa037ab964493 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 29 Apr 2022 09:04:02 +0200 Subject: [PATCH] Extract phpstan extension config into its own file --- phpstan/config.neon | 7 +------ phpstan/rules.neon | 10 ++++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 phpstan/rules.neon diff --git a/phpstan/config.neon b/phpstan/config.neon index 500e97ed4..a07471575 100644 --- a/phpstan/config.neon +++ b/phpstan/config.neon @@ -4,6 +4,7 @@ includes: - ../vendor/phpstan/phpstan-strict-rules/rules.neon - ../vendor/phpstan/phpstan-symfony/extension.neon - ../vendor/phpstan/phpstan-symfony/rules.neon + - ./rules.neon # Composer-specific PHPStan extensions, can be reused by third party packages by including 'vendor/composer/composer/phpstan/rules.neon' in your phpstan config - ./baseline.neon - ./ignore-by-php-version.neon.php @@ -58,9 +59,3 @@ parameters: - Composer\Composer::VERSION - Composer\Composer::RELEASE_DATE - Composer\Composer::SOURCE_VERSION - -services: - - - class: Composer\PHPStan\ConfigReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension diff --git a/phpstan/rules.neon b/phpstan/rules.neon new file mode 100644 index 000000000..8d81b0dd3 --- /dev/null +++ b/phpstan/rules.neon @@ -0,0 +1,10 @@ +# Composer-specific PHPStan extensions +# +# These can be reused by third party packages by including 'vendor/composer/composer/phpstan/rules.neon' +# in your phpstan config + +services: + - + class: Composer\PHPStan\ConfigReturnTypeExtension + tags: + - phpstan.broker.dynamicMethodReturnTypeExtension