This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
forked from webonyx/graphql-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon.dist
85 lines (75 loc) · 3.42 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
parameters:
# TODO increase to max
level: 8
paths:
- benchmarks
- examples
- generate-class-reference.php
- src
- tests
excludePaths:
# PHP 8 attributes
- src/Type/Definition/Deprecated.php
- src/Type/Definition/Description.php
# PHP 8.1 enums
- src/Type/Definition/PhpEnumType.php
- tests/Type/PhpEnumTypeTest.php
- tests/Type/PhpEnumType
ignoreErrors:
# Since this is a library that is supposed to be flexible, we don't
# want to lock down every possible extension point.
- "~Unsafe usage of new static\\(\\)~"
# This class uses magic methods to reduce a whole lot of boilerplate required to
# allow partial parsing of language fragments.
- "~Variable method call on GraphQL\\\\Language\\\\Parser\\.~"
# Useful/necessary when dealing with arbitrary user data
-
message: "~Variable property access on object~"
path: src/Utils/Utils.php
count: 2
# In PHP 8.2, PHPStan no longer believes @property works without magic methods,
# but all implementors of the interfaces actually have those properties.
-
message: "~Access to an undefined property .*GraphQL\\\\Type\\\\Definition\\\\NamedType.*::\\$name~"
reportUnmatched: false
-
message: "~Access to an undefined property .*GraphQL\\\\Type\\\\Definition\\\\NamedType.*::\\$description~"
reportUnmatched: false
-
message: "~Access to an undefined property .*GraphQL\\\\Type\\\\Definition\\\\NamedType.*::\\$astNode~"
reportUnmatched: false
-
message: "~Access to an undefined property .*GraphQL\\\\Type\\\\Definition\\\\NamedType.*::\\$extensionASTNodes~"
reportUnmatched: false
-
message: "~Access to an undefined property .*GraphQL\\\\Language\\\\AST\\\\TypeDefinitionNode.*::\\$name~"
reportUnmatched: false
-
message: "~Access to an undefined property .*GraphQL\\\\Language\\\\AST\\\\TypeExtensionNode.*::\\$name~"
reportUnmatched: false
# In PHP 8.2, PHPStan seems to not allow dynamic checks for properties on classes, even when they are not final.
-
message: "~Call to function property_exists\\(\\) with .* will always evaluate to false\\.~"
reportUnmatched: false
# PHPStan does not play nicely with markTestSkipped()
- message: "~Unreachable statement - code above always terminates~"
path: tests
includes:
- phpstan-baseline.neon
services:
-
class: GraphQL\Tests\PhpStan\Type\Definition\Type\IsAbstractTypeStaticMethodTypeSpecifyingExtension
tags:
- phpstan.typeSpecifier.staticMethodTypeSpecifyingExtension
-
class: GraphQL\Tests\PhpStan\Type\Definition\Type\IsCompositeTypeStaticMethodTypeSpecifyingExtension
tags:
- phpstan.typeSpecifier.staticMethodTypeSpecifyingExtension
-
class: GraphQL\Tests\PhpStan\Type\Definition\Type\IsInputTypeStaticMethodTypeSpecifyingExtension
tags:
- phpstan.typeSpecifier.staticMethodTypeSpecifyingExtension
-
class: GraphQL\Tests\PhpStan\Type\Definition\Type\IsOutputTypeStaticMethodTypeSpecifyingExtension
tags:
- phpstan.typeSpecifier.staticMethodTypeSpecifyingExtension