From 55edcaee50c7ba5692703abba7e7e395a01a21e4 Mon Sep 17 00:00:00 2001 From: Christian Raue Date: Sat, 12 Feb 2022 09:49:43 +0100 Subject: [PATCH] improved PHPStan checks by adding some extensions --- composer.json | 5 +++++ phpstan-config.neon | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 205bdbd..151eeba 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,11 @@ "doctrine/data-fixtures": "^1.0.1", "doctrine/dbal": "^2.7|^3", "doctrine/doctrine-fixtures-bundle": "^2.4.1|^3.1", + "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.4", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "phpstan/phpstan-symfony": "^1.1", "phpunit/phpunit": "^9.5", "symfony/browser-kit": "~4.4|~5.3|^6", "symfony/phpunit-bridge": "^6", @@ -56,6 +60,7 @@ }, "config": { "allow-plugins": { + "phpstan/extension-installer": true, "symfony/flex": true }, "sort-packages": true diff --git a/phpstan-config.neon b/phpstan-config.neon index c9ecaa6..31a08d1 100644 --- a/phpstan-config.neon +++ b/phpstan-config.neon @@ -1,14 +1,12 @@ parameters: level: 5 + treatPhpDocTypesAsCertain: false paths: - . excludePaths: - Tests/* - vendor/* ignoreErrors: - - - message: '#^Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::children\(\)\.$#' - path: DependencyInjection/Configuration.php - message: '#^Parameter \$manager of method Craue\\GeoBundle\\Doctrine\\Fixtures\\GeonamesPostalCodeData::(getRepository|clearPostalCodesTable|addEntries)\(\) has invalid type Doctrine\\Common\\Persistence\\ObjectManager\.$#' path: Doctrine/Fixtures/GeonamesPostalCodeData.php