|
1 | 1 | parameters: |
2 | | - # PHPStan cannot find files in this test directory automatically. |
3 | | - scanDirectories: |
4 | | - - ../../core/tests/Drupal/Tests |
5 | 2 | level: 6 |
6 | 3 | customRulesetUsed: true |
7 | 4 | paths: |
8 | 5 | - . |
9 | | - # We inherit a lot of Drupal core docs that don't specify iterable types on |
10 | | - # arrays, not sure we can fix this in a good way. |
11 | | - checkMissingIterableValueType: false |
12 | | - # Not sure we can specify generic types properly with Drupal coding standards |
13 | | - # yet, disable for now. |
14 | | - checkGenericClassInNonGenericObjectType: false |
15 | | - excludePaths: |
16 | | - # Exclude the RouteLoad producer because the redirect module is not D10 |
17 | | - # compatible so we are not downloading it. |
18 | | - - src/Plugin/GraphQL/DataProducer/Routing/RouteLoad.php |
19 | 6 | ignoreErrors: |
20 | | - # @todo Ignore phpstan-drupal extension's rules for now, activate later. |
21 | | - - '#\Drupal calls should be avoided in classes, use dependency injection instead#' |
| 7 | + # We inherit a lot of Drupal core docs that don't specify iterable types on |
| 8 | + # arrays, not sure we can fix this in a good way. |
| 9 | + - identifier: missingType.iterableValue |
22 | 10 | # new static() is a best practice in Drupal, so we cannot fix that. |
23 | 11 | - "#^Unsafe usage of new static\\(\\)\\.$#" |
24 | | - # Drupal allows object property access to custom fields, so we cannot fix |
25 | | - # that. |
26 | | - - "#^Access to an undefined property Drupal\\\\#" |
27 | 12 | # We forgot to use return type hints on some interfaces, cannot be changed |
28 | 13 | # in stable 4.0. |
29 | 14 | # @todo use return type hints everywhere for 5.0. |
@@ -51,3 +36,34 @@ parameters: |
51 | 36 | message: "#^Method Drupal\\\\graphql\\\\Entity\\\\ServerInterface\\:\\:removePersistedQueryInstance\\(\\) has no return type specified\\.$#" |
52 | 37 | count: 1 |
53 | 38 | path: src/Entity/ServerInterface.php |
| 39 | + |
| 40 | + # @todo Some leftover \Drupal calls that can be fixed later. |
| 41 | + - |
| 42 | + message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" |
| 43 | + count: 1 |
| 44 | + path: examples/graphql_example/src/Wrappers/QueryConnection.php |
| 45 | + |
| 46 | + - |
| 47 | + message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" |
| 48 | + count: 3 |
| 49 | + path: src/Controller/ServerListBuilder.php |
| 50 | + |
| 51 | + - |
| 52 | + message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" |
| 53 | + count: 1 |
| 54 | + path: src/GraphQL/Execution/Executor.php |
| 55 | + |
| 56 | + - |
| 57 | + message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" |
| 58 | + count: 1 |
| 59 | + path: src/Plugin/GraphQL/DataProducer/Entity/Fields/Image/ImageDerivative.php |
| 60 | + |
| 61 | + - |
| 62 | + message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" |
| 63 | + count: 1 |
| 64 | + path: src/Plugin/GraphQL/DataProducer/EntityDefinition/EntityDefinition.php |
| 65 | + |
| 66 | + - |
| 67 | + message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" |
| 68 | + count: 1 |
| 69 | + path: src/Plugin/GraphQL/DataProducer/User/PasswordReset.php |
0 commit comments