diff --git a/.phpstan/default.neon b/.phpstan/default.neon index 7e5eeaf..9ab523e 100644 --- a/.phpstan/default.neon +++ b/.phpstan/default.neon @@ -7,3 +7,7 @@ parameters: paths: - ../src - ../tests + ignoreErrors: + - + message: '#Class Symfony\Component\Config\Definition\Builder\TreeBuilder does not have a constructor and must be instantiated without any parameters.' + path: src/DependencyInjection/Configuration.php diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 3398f37..80cd13e 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -125,7 +125,7 @@ private function createTreeBuilder(string $name): TreeBuilder { // Symfony 4.2 + if (method_exists(TreeBuilder::class, '__construct')) { - return new TreeBuilder($name); /** @phpstan-ignore-line */ + return new TreeBuilder($name); } // Symfony 4.1 and below