@@ -8,13 +8,19 @@ parameters:
88 # PHPStan cannot find files in this test directory automatically.
99 scanDirectories :
1010 - ../../core/tests/Drupal/Tests
11- level : 5
11+ level : 6
1212 customRulesetUsed : true
1313 paths :
1414 - .
1515 # We test with PHPStan on Drupal 8 and 9 and might have different ignored
1616 # errors on both.
1717 reportUnmatchedIgnoredErrors : false
18+ # We inherit a lot of Drupal core docs that don't specify iterable types on
19+ # arrays, not sure we can fix this in a good way.
20+ checkMissingIterableValueType : false
21+ # Not sure we can specify generic types properly with Drupal coding standards
22+ # yet, disable for now.
23+ checkGenericClassInNonGenericObjectType : false
1824 ignoreErrors :
1925 # @todo Ignore phpstan-drupal extension's rules for now, activate later.
2026 - ' #\Drupal calls should be avoided in classes , use dependency injection instead #'
@@ -46,3 +52,35 @@ parameters:
4652 count: 1
4753 path: src/Plugin/LanguageNegotiation/OperationLanguageNegotiation.php
4854 - "#^Parameter .+ of method Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryInterface\\:\\:range\\(\\) expects null, int given\\.$#"
55+ # We forgot to use return type hints on some interfaces, cannot be changed
56+ # in stable 4.0.
57+ # @todo use return type hints everywhere for 5.0.
58+ -
59+ message: "#^Method Drupal\\\\graphql\\\\Entity\\\\ServerInterface\\:\\:addPersistedQueryInstance\\(\\) has no return typehint specified\\.$#"
60+ count: 1
61+ path: src/Entity/ServerInterface.php
62+
63+ -
64+ message: "#^Method Drupal\\\\graphql\\\\Entity\\\\ServerInterface\\:\\:removePersistedQueryInstance\\(\\) has no return typehint specified\\.$#"
65+ count: 1
66+ path: src/Entity/ServerInterface.php
67+
68+ -
69+ message: "#^Method Drupal\\\\graphql\\\\Entity\\\\ServerInterface\\:\\:removeAllPersistedQueryInstances\\(\\) has no return typehint specified\\.$#"
70+ count: 1
71+ path: src/Entity/ServerInterface.php
72+
73+ -
74+ message: "#^Method Drupal\\\\graphql\\\\Plugin\\\\PersistedQueryPluginInterface\\:\\:setWeight\\(\\) has no return typehint specified\\.$#"
75+ count: 1
76+ path: src/Plugin/PersistedQueryPluginInterface.php
77+
78+ -
79+ message: "#^Method Drupal\\\\graphql\\\\Plugin\\\\SchemaExtensionPluginInterface\\:\\:registerResolvers\\(\\) has no return typehint specified\\.$#"
80+ count: 1
81+ path: src/Plugin/SchemaExtensionPluginInterface.php
82+
83+ -
84+ message: "#^Unable to resolve the template type ExpectedType in call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\)$#"
85+ count: 1
86+ path: tests/src/Kernel/ResolverBuilderTest.php
0 commit comments