-
Notifications
You must be signed in to change notification settings - Fork 2
/
phpstan.neon.dist
114 lines (107 loc) · 6.46 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
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
includes:
- phar://phpstan.phar/conf/bleedingEdge.neon
# remove once https://github.com/phpstan/extension-installer/issues/36 is fixed
- phpstan-ext.neon
services:
-
factory: Mvorisek\Atk4\Hintable\Phpstan\SeedDmrtExtension(Mvorisek\Atk4\Hintable\Tests\Phpstan\SeedDemo\Bodyshop, acceptCar, 1)
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
-
factory: Mvorisek\Atk4\Hintable\Phpstan\SeedDmrtExtension(Mvorisek\Atk4\Hintable\Tests\Phpstan\SeedDemo\Car, fromSeed, 0)
tags:
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
parameters:
level: 6
checkMissingOverrideMethodAttribute: true
paths:
- .
excludePaths:
- vendor
ignoreErrors:
# relax strict rules
- '~^Variable (static )?(property access|method call) on .+\.~'
# TODO custom PHPStan error is missing an identifier
-
path: 'src/Phpstan/AssertSamePhpstanTypeRule.php'
identifier: return.type
message: '~^Method Mvorisek\\Atk4\\Hintable\\Phpstan\\AssertSamePhpstanTypeRule::processNode\(\) should return list<PHPStan\\Rules\\IdentifierRuleError> but returns array\{PHPStan\\Rules\\NonIgnorableRuleError\}\.$~'
count: 3
# TODO https://github.com/phpstan/phpstan/issues/8311#issuecomment-1509916189
-
path: 'src/Phpstan/AssertSamePhpstanTypeRule.php'
identifier: phpstanApi.instanceofType
message: '~^Doing instanceof PHPStan\\Type\\Constant\\ConstantStringType is error-prone and deprecated\. Use Type::getConstantStrings\(\) instead\.$~'
count: 1
-
path: 'src/Phpstan/SeedDmrtExtension.php'
identifier: phpstanApi.instanceofType
message: '~^Doing instanceof PHPStan\\Type\\IntersectionType is error-prone and deprecated\.$~'
count: 1
-
path: 'src/Phpstan/SeedDmrtExtension.php'
identifier: phpstanApi.instanceofType
message: '~^Doing instanceof PHPStan\\Type\\ObjectType is error-prone and deprecated\. Use Type::isObject\(\) or Type::getObjectClassNames\(\) instead\.$~'
count: 1
-
path: 'src/Phpstan/SeedDmrtExtension.php'
identifier: phpstanApi.instanceofType
message: '~^Doing instanceof PHPStan\\Type\\Constant\\ConstantArrayType is error-prone and deprecated\. Use Type::getConstantArrays\(\) instead\.$~'
count: 1
-
path: 'src/Phpstan/SeedDmrtExtension.php'
identifier: phpstanApi.instanceofType
message: '~^Doing instanceof PHPStan\\Type\\Constant\\ConstantStringType is error-prone and deprecated\. Use Type::getConstantStrings\(\) instead\.$~'
count: 1
-
path: 'src/Phpstan/SeedDmrtExtension.php'
identifier: phpstanApi.instanceofType
message: '~^Doing instanceof PHPStan\\Type\\Generic\\GenericClassStringType is error-prone and deprecated\. Use Type::isClassStringType\(\) and Type::getClassStringObjectType\(\) instead\.$~'
count: 1
# https://github.com/phpstan/phpstan/issues/4945
# https://github.com/phpstan/phpstan/issues/6175
-
path: 'src/Core/MethodTrait.php'
identifier: return.type
message: '~^Method Mvorisek\\Atk4\\Hintable\\Tests\\Core\\MethodMock::(methodName|methodNameFull|methodClosure|methodClosureProtected)\(\) should return Mvorisek\\Atk4\\Hintable\\Core\\MagicMethod<static\(Mvorisek\\Atk4\\Hintable\\Tests\\Core\\MethodMock\), (string|Closure)> but returns Mvorisek\\Atk4\\Hintable\\Core\\MagicMethod<\$this\(Mvorisek\\Atk4\\Hintable\\Tests\\Core\\MethodMock\), (string|Closure)>\.$~'
count: 4
-
path: 'src/Core/PropTrait.php'
identifier: return.type
message: '~^Method Mvorisek\\Atk4\\Hintable\\Tests\\Core\\PropMock::(propName|propNameFull)\(\) should return Mvorisek\\Atk4\\Hintable\\Core\\MagicProp<static\(Mvorisek\\Atk4\\Hintable\\Tests\\Core\\PropMock\), string> but returns Mvorisek\\Atk4\\Hintable\\Core\\MagicProp<\$this\(Mvorisek\\Atk4\\Hintable\\Tests\\Core\\PropMock\), string>\.$~'
count: 2
-
path: 'src/Phpstan/AssertSamePhpstanTypeRule.php'
identifier: phpstanApi.runtimeReflection
message: '~^Function class_uses\(\) is a runtime reflection concept that might not work in PHPStan because it uses fully static reflection engine\. Use objects retrieved from ReflectionProvider instead\.$~'
count: 1
-
path: 'src/Data/HintableModelTrait.php'
identifier: trait.unused
message: '~^Trait Mvorisek\\Atk4\\Hintable\\Data\\HintableModelTrait is used zero times and is not analysed\.$~'
count: 1
-
path: 'src/Phpstan/SeedDmrtExtension.php'
identifier: phpstanApi.runtimeReflection
message: '~^Creating new ReflectionMethod is a runtime reflection concept that might not work in PHPStan because it uses fully static reflection engine\. Use objects retrieved from ReflectionProvider instead\.$~'
count: 1
-
path: 'src/Phpstan/WrapMethodReflection.php'
identifier: phpstanApi.class
message: '~^Extending PHPStan\\Reflection\\Annotations\\AnnotationMethodReflection is not covered by backward compatibility promise\. The class might change in a minor PHPStan version\.$~'
count: 1
-
path: 'src/Phpstan/WrapMethodReflection.php'
identifier: phpstanApi.method
message: '~^Calling PHPStan\\Reflection\\Annotations\\AnnotationMethodReflection::__construct\(\) is not covered by backward compatibility promise\. The method might change in a minor PHPStan version\.$~'
count: 1
-
path: 'src/Phpstan/WrapPropertyReflection.php'
identifier: phpstanApi.class
message: '~^Extending PHPStan\\Reflection\\Annotations\\AnnotationPropertyReflection is not covered by backward compatibility promise\. The class might change in a minor PHPStan version\.$~'
count: 1
-
path: 'src/Phpstan/WrapPropertyReflection.php'
identifier: phpstanApi.method
message: '~^Calling PHPStan\\Reflection\\Annotations\\AnnotationPropertyReflection::__construct\(\) is not covered by backward compatibility promise\. The method might change in a minor PHPStan version\.$~'
count: 1