Skip to content

Commit

Permalink
Properly ignore error
Browse files Browse the repository at this point in the history
  • Loading branch information
Lustmored committed Dec 21, 2023
1 parent 768f328 commit ef963b1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ jobs:
include:
- php: '7.2'
symfony: '2.8.*'
phpstan: .phpstan/default.neon
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '3.0.*'
phpstan: .phpstan/default.neon
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '3.1.*'
phpstan: .phpstan/default.neon
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '3.2.*'
phpstan: .phpstan/default.neon
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '3.3.*'
phpstan: .phpstan/default.neon
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '3.4.*'
phpstan: .phpstan/default.neon
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '4.0.*'
phpstan: .phpstan/default.neon
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '4.1.*'
phpstan: .phpstan/default.neon
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '4.2.*'
phpstan: .phpstan/default.neon
Expand Down
8 changes: 8 additions & 0 deletions .phpstan/symfony_4.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# config for Symfony 2.8-4.1

includes:
- default.neon

parameters:
ignoreErrors:
- '#Class Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder does not have a constructor and must be instantiated without any parameters.#'
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef963b1

Please sign in to comment.