diff --git a/composer.json b/composer.json index e5922475..1111bb88 100644 --- a/composer.json +++ b/composer.json @@ -15,12 +15,12 @@ "rector/jack": "^1.0", "rector/rector-src": "dev-main", "rector/swiss-knife": "^2.6", + "shipmonk/dead-code-detector": "^1.4", "symplify/easy-coding-standard": "^13.2", "symplify/phpstan-extensions": "^12.0", "symplify/phpstan-rules": "^14.13.1", "tomasvotruba/class-leak": "^2.1", "tomasvotruba/type-coverage": "^2.3", - "tomasvotruba/unused-public": "^2.2", "tracy/tracy": "^2.12" }, "autoload": { diff --git a/phpstan.neon b/phpstan.neon index 30ec8a0b..a9c27561 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -35,6 +35,11 @@ parameters: narrow_return: true ignoreErrors: + # DI container constructors are not dead code + - + identifier: shipmonk.deadMethod + message: '#^Unused .*?::__construct$#' + # phpstan false positive - '#Parameter \#1 \$className of method Rector\\PhpParser\\AstResolver\:\:resolveClassMethod\(\) expects class\-string, string given#'