-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathphpstan-baseline-well-known.neon
129 lines (116 loc) · 7.03 KB
/
phpstan-baseline-well-known.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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
parameters:
excludePaths:
- packages/testing/docs/Examples/TestCase.php
ignoreErrors:
# Unwanted strict rules
# (is there a better way to disable them?)
-
message: "#does not call parent constructor from#"
path: packages/**/*Test.php
# Larastan doesn't support phpstan/phpstan-strict-rules
# https://github.com/phpstan/phpstan-strict-rules/issues/140
- "#^Dynamic call to static method Illuminate\\\\Testing\\\\TestResponse\\<[^>]+\\>\\:\\:assert[^(]+\\(\\)\\.$#"
- "#^Dynamic call to static method Illuminate\\\\Database\\\\Eloquent\\\\Model(\\<[^>]+\\>)?\\:\\:[^(]+\\(\\)\\.$#"
- "#^Dynamic call to static method Illuminate\\\\Database\\\\Eloquent\\\\Builder(\\<[^>]+\\>)?\\:\\:[^(]+\\(\\)\\.$#"
# Sometimes it is needed...
# https://github.com/phpstan/phpstan/issues/3296
-
message: "#^Variable method call on .+?\\.$#"
paths:
- packages/eloquent/src/ModelHelper.php
-
message: "#^Variable property access on .+?\\.$#"
paths:
- packages/serializer/src/Normalizers/SerializableNormalizer.php
-
message: "#Calling putenv\\(\\) is forbidden, might overwrite existing variables\\.#"
paths:
- packages/documentator/src/Processor/Tasks/Preprocess/Instructions/IncludeArtisan/Instruction.php
# False positive
# https://github.com/nunomaduro/larastan/issues/483
# https://github.com/nunomaduro/larastan/pull/917
-
message: "#^Dynamic call to static method Illuminate\\\\Http\\\\Response::getContent\\(\\)\\.$#"
paths:
- packages/testing/src/Mixins/TestResponseMixin.php
# False positive
# https://github.com/phpstan/phpstan-mockery/issues/34
-
message: "#^Creating callable from Mockery\\\\MockInterface but it might not be a callable\\.$#"
paths:
- packages/**/*Test.php
# False positive
# https://github.com/phpstan/phpstan-mockery/issues/18
-
message: "#^Call to protected method (getResolverRelation|getResolverModel|getResolverClass|getFieldValue)\\(\\) of class LastDragon_ru\\\\LaraASP\\\\GraphQL\\\\Stream\\\\Directives\\\\Directive\\.$#"
paths:
- packages/graphql/src/Stream/Directives/DirectiveTest.php
-
message: "#^Call to protected method getNulls\\(\\) of class LastDragon_ru\\\\LaraASP\\\\GraphQL\\\\SortBy\\\\Operators\\\\Sort\\.$#"
paths:
- packages/graphql/src/SortBy/Operators/SortTest.php
-
message: "#^Call to protected method getBuilder\\(\\) of class LastDragon_ru\\\\LaraASP\\\\GraphQL\\\\Stream\\\\Directives\\\\Directive\\.$#"
paths:
- packages/graphql/src/Stream/Directives/DirectiveTest.php
-
message: "#^Call to protected method getContent\\(\\) of class LastDragon_ru\\\\LaraASP\\\\Testing\\\\Constraints\\\\FileSystem\\\\DirectoryMatchesDirectory\\.$#"
paths:
- packages/testing/src/Constraints/FileSystem/DirectoryMatchesDirectoryTest.php
# PHPStan doesn't allow use `@var` and `assert()` for `$this` inside Closure yet
# https://github.com/phpstan/phpstan/issues/149
# https://github.com/phpstan/phpstan/issues/8904
# https://github.com/phpstan/phpstan/issues/11267
-
message: "#^PHPDoc tag @var with type Illuminate\\\\Database\\\\Eloquent\\\\Builder\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\> is not subtype of native type \\$this\\(LastDragon_ru\\\\LaraASP\\\\Eloquent\\\\Mixins\\\\EloquentBuilderMixin\\)\\.$#"
paths:
- packages/eloquent/src/Mixins/EloquentBuilderMixin.php
-
message: "#^PHPDoc tag @var with type Illuminate\\\\Testing\\\\TestResponse\\<Symfony\\\\Component\\\\HttpFoundation\\\\Response\\> is not subtype of native type \\$this\\(LastDragon_ru\\\\LaraASP\\\\Testing\\\\Mixins\\\\TestResponseMixin\\)\\.$#"
paths:
- packages/testing/src/Mixins/TestResponseMixin.php
# ArrayAccess&array gives mixed
# https://github.com/phpstan/phpstan/issues/12125
-
message: "#^Method LastDragon_ru\\\\LaraASP\\\\GraphQL\\\\Utils\\\\AstManipulator::getTypeDefinition\\(\\) should return \\(GraphQL\\\\Language\\\\AST\\\\Node&GraphQL\\\\Language\\\\AST\\\\TypeDefinitionNode\\)\\|GraphQL\\\\Type\\\\Definition\\\\Type but returns mixed\\.$#"
paths:
- packages/graphql/src/Utils/AstManipulator.php
# Closure parameters cannot be inferred from return type yet
# https://github.com/phpstan/phpstan/issues/11317
-
message: '#^Parameter \#3 \$args of method LastDragon_ru\\LaraASP\\GraphQL\\Stream\\Directives\\Directive::getBuilder\(\) expects array<string, mixed>, array given\.$#'
paths:
- packages/graphql/src/Stream/Directives/Directive.php
-
message: '#^Parameter \#2 \$builder of class LastDragon_ru\\LaraASP\\GraphQL\\Stream\\Exceptions\\BuilderUnsupported constructor expects class-string, mixed given\.$#'
paths:
- packages/graphql/src/Stream/Directives/Directive.php
-
message: '#^Parameter \#5 \$args of method LastDragon_ru\\LaraASP\\GraphQL\\Stream\\Directives\\Directive::getFieldValue\(\) expects array<string, mixed>, array given\.$#'
paths:
- packages/graphql/src/Stream/Directives/Directive.php
-
message: '#^Parameter \#4 \$args of method Nuwave\\Lighthouse\\Execution\\ResolveInfo::enhanceBuilder\(\) expects array<string, mixed>, array given\.$#'
paths:
- packages/graphql/src/Testing/Package/Directives/ExposeBuilderDirective.php
# Would be nice to have a way add types for console command arguments
# https://github.com/symfony/symfony/issues/58406
-
message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(mixed\): mixed\)\|null, Closure\(bool\|float\|int\|resource\|string\|null\): string given\.$#'
paths:
- packages/documentator/src/Commands/Preprocess.php
# is_a(static::class, Class::class, true) false positive
# https://github.com/phpstan/phpstan/issues/1239
-
message: '#^Parameter \#2 \$value of static method LastDragon_ru\\LaraASP\\Documentator\\Markdown\\Data\\Data<T>::set\(\) expects T, null given\.$#'
paths:
- packages/documentator/src/Markdown/Data/Data.php
# (dev) Required for tests
-
message: "#^Class `[^`]+` must be marked by `@internal`\\.$#"
paths:
- packages/dev/src/PhpStan/ClassMustBeInternal/RuleTest.php
-
message: "#^Class constant `[^`]+` must be typed\\.$#"
paths:
- packages/dev/src/PhpStan/ClassConstantMustBeTyped/RuleTest.php