forked from sonata-project/SonataAdminBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan-baseline.neon
26 lines (26 loc) · 2.06 KB
/
phpstan-baseline.neon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
parameters:
ignoreErrors:
- # Disallow VariableMethodCallRule and VariablePropertyFetchRule
message: '#^Variable (method call|property access)#'
path: .
- # https://github.com/phpstan/phpstan-phpunit/issues/87
message: '#^Trying to mock an undefined method [a-zA-Z]*\(\) on class stdClass\.$#'
path: tests/
- # https://github.com/phpstan/phpstan-strict-rules/issues/130
message: '#^Call to static method PHPUnit\\Framework\\Assert::.* will always evaluate to true\.$#'
path: tests/
- # This error is made on purpose for php version < 8
message: '#^Method Sonata\\AdminBundle\\Tests\\Fixtures\\Entity\\FooToStringNull\:\:__toString\(\) should return string but returns null\.$#'
path: tests/Fixtures/Entity/FooToStringNull.php
- # The phpstan-param is less precise than the psalm-param https://github.com/phpstan/phpstan/issues/4703
message: '#^Parameter \#3 \$idx of method Sonata\\AdminBundle\\Model\\ModelManagerInterface\<T of object\>\:\:addIdentifiersToQuery\(\) expects array\<int\|string\>\&nonEmpty\, array\<array\<string\>\|int\|string\>\&nonEmpty given\.$#'
path: src/Form/DataTransformer/ModelToIdPropertyTransformer.php
- # `treatPhpdocAsCertain: false` should not report this https://github.com/phpstan/phpstan/issues/5333
message: '#^Instanceof between Symfony\\Component\\Routing\\Route and Symfony\\Component\\Routing\\Route will always evaluate to true\.$#'
path: src/Route/RouteCollection.php
- # DataTransformer contravariance is not really mandatory
message: '#(reverseTransform|transform)\(\) should be contravariant#'
path: src/Form/DataTransformer
- # Generic with intersection is buggy https://github.com/phpstan/phpstan/issues/5336
message: '#Sonata\\AdminBundle\\Datagrid\\(Datagrid|PagerInterface)<PHPUnit\\Framework\\MockObject\\Stub&Sonata\\AdminBundle\\Datagrid\\ProxyQueryInterface>#'
path: tests/Datagrid/DatagridTest.php