diff --git a/composer.json b/composer.json index 64f7ced8875..86dd5e4ddef 100644 --- a/composer.json +++ b/composer.json @@ -22,17 +22,17 @@ "require-dev": { "myclabs/php-enum": "^1.8", "phpstan/extension-installer": "^1.4", - "phpstan/phpstan-deprecation-rules": "^2.0", "phpstan/phpstan": "^2.1", + "phpstan/phpstan-deprecation-rules": "^2.0", "phpunit/phpunit": "^11.5", "rector/rector": "^2.1.1", "shipmonk/composer-dependency-analyser": "^1.8", + "shipmonk/dead-code-detector": "^1.4", "symfony/http-kernel": "6.1.*", "symplify/easy-coding-standard": "^13.0", "symplify/phpstan-extensions": "^12.0", "symplify/vendor-patches": "^11.3", - "tomasvotruba/class-leak": "^2.0", - "tomasvotruba/unused-public": "^2.0" + "tomasvotruba/class-leak": "^2.0" }, "autoload": { "psr-4": { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 00000000000..ac12beb1358 --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,13 @@ +parameters: + ignoreErrors: + - + message: '#^Function Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\service not found\.$#' + identifier: function.notFound + count: 1 + path: config/config.php + + - + message: '#^Used function Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\service not found\.$#' + identifier: function.notFound + count: 1 + path: config/config.php diff --git a/phpstan.neon b/phpstan.neon index 6b3a414e649..ceca0334344 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,3 +1,6 @@ +includes: + - phpstan-baseline.neon + parameters: level: 8 @@ -15,6 +18,11 @@ parameters: - '*/Fixture/*' ignoreErrors: + # services are instantiated via the DI container + - + identifier: shipmonk.deadMethod + message: '#^Unused .*?::__construct$#' + - message: '#Parameter \#1 \$commandName of method Symfony\\Component\\Console\\Application\:\:setDefaultCommand\(\) expects string, string\|null given#' path: src/Console/ConfigTransformerApplication.php