forked from webonyx/graphql-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon.dist
29 lines (26 loc) · 1.65 KB
/
phpstan.neon.dist
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
27
28
29
parameters:
level: 2
paths:
- %currentWorkingDirectory%/src
- %currentWorkingDirectory%/tests
ignoreErrors:
- "~Construct empty\\(\\) is not allowed\\. Use more strict comparison~"
- "~(Method|Property) .+::.+(\\(\\))? (has parameter \\$\\w+ with no|has no return|has no) typehint specified~"
- "~Variable property access on .+~"
- "~Variable method call on GraphQL\\\\Language\\\\Parser\\.~"
- "~Variable method call on static\\(GraphQL\\\\Server\\\\ServerConfig\\)~" # TODO get rid of
- "~Only booleans are allowed in .*~" # TODO https://github.com/phpstan/phpstan-strict-rules/issues/2
# A whole class of errors in PHPStan is a result of PHP's lack of union types.
# This commonly happens in the parts of the code that deal with the GraphQL
# type system where we can currently use interfaces and lose type safety.
# Until we find a better way, we can list related error's here.
- "~Access to an undefined property GraphQL\\\\Type\\\\Definition\\\\NamedType::\\$name~"
- "~Access to an undefined property GraphQL\\\\Language\\\\AST\\\\DefinitionNode::\\$name~"
# Those come from graphql-php\tests\Language\VisitorTest.php
- "~Access to an undefined property GraphQL\\\\Language\\\\AST\\\\.+::\\$didEnter~"
- "~Access to an undefined property GraphQL\\\\Language\\\\AST\\\\.+::\\$didLeave~"
- "~Access to an undefined property GraphQL\\\\Language\\\\AST\\\\Node::\\$value~"
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon