forked from phpstan/phpstan-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
152 lines (149 loc) · 5.71 KB
/
phpstan.neon
File metadata and controls
152 lines (149 loc) · 5.71 KB
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
includes:
- ../vendor/phpstan/phpstan-deprecation-rules/rules.neon
- ../vendor/phpstan/phpstan-nette/rules.neon
- ../vendor/phpstan/phpstan-phpunit/extension.neon
- ../vendor/phpstan/phpstan-phpunit/rules.neon
- ../vendor/phpstan/phpstan-strict-rules/rules.neon
- ../vendor/shipmonk/dead-code-detector/rules.neon
- ../conf/bleedingEdge.neon
- ../phpstan-baseline.neon
- ../phpstan-baseline.php
- ignore-by-php-version.neon.php
- ignore-by-architecture.neon.php
parameters:
level: 8
paths:
- PHPStan
- ../src
- ../tests
bootstrapFiles:
- ../tests/phpstan-bootstrap.php
cache:
nodesByStringCountMax: 128
checkUninitializedProperties: true
checkMissingCallableSignature: true
reportPossiblyNonexistentConstantArrayOffset: true
excludePaths:
- ../tests/*/data/*
- ../tests/tmp/*
- ../tests/vendor/*
- ../tests/PHPStan/Analyser/nsrt/*
- ../tests/PHPStan/Analyser/traits/*
- ../tests/notAutoloaded/*
- ../tests/bench/*
- ../tests/PHPStan/Reflection/UnionTypesTest.php
- ../tests/PHPStan/Reflection/MixedTypeTest.php
- ../tests/e2e/magic-setter/*
- ../tests/PHPStan/Rules/Properties/UninitializedPropertyRuleTest.php
- ../tests/PHPStan/Command/IgnoredRegexValidatorTest.php
- ../src/Command/IgnoredRegexValidator.php
exceptions:
uncheckedExceptionClasses:
- 'PHPStan\ShouldNotHappenException'
- 'Symfony\Component\Console\Exception\InvalidArgumentException'
- 'PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation'
- 'PHPStan\BetterReflection\SourceLocator\Exception\InvalidArgumentException'
- 'Symfony\Component\Finder\Exception\DirectoryNotFoundException'
- 'InvalidArgumentException'
- 'PHPStan\DependencyInjection\ParameterNotFoundException'
- 'PHPStan\DependencyInjection\DuplicateIncludedFilesException'
- 'PHPStan\Analyser\UndefinedVariableException'
- 'RuntimeException'
- 'Nette\Neon\Exception'
- 'Nette\Utils\JsonException'
- 'PHPStan\File\CouldNotReadFileException'
- 'PHPStan\File\CouldNotWriteFileException'
- 'PHPStan\Parser\ParserErrorsException'
- 'ReflectionException'
- 'Nette\Utils\AssertionException'
- 'PHPStan\File\PathNotFoundException'
- 'PHPStan\Broker\ClassNotFoundException'
- 'PHPStan\Broker\FunctionNotFoundException'
- 'PHPStan\Broker\ConstantNotFoundException'
- 'PHPStan\DependencyInjection\MissingServiceException'
- 'PHPStan\Reflection\MissingMethodFromReflectionException'
- 'PHPStan\Reflection\MissingPropertyFromReflectionException'
- 'PHPStan\Reflection\MissingConstantFromReflectionException'
- 'PHPStan\Type\CircularTypeAliasDefinitionException'
- 'PHPStan\Reflection\MissingStaticAccessorInstanceException'
- 'LogicException'
- 'Error'
- 'PHPStan\Analyser\Generator\TrampolineException'
check:
missingCheckedExceptionInThrows: true
tooWideThrowType: true
throwTypeCovariance: true
ignoreErrors:
- '#^Dynamic call to static method PHPUnit\\Framework\\\S+\(\)\.$#'
- '#should be contravariant with parameter \$node \(PhpParser\\Node\) of method PHPStan\\Rules\\Rule<PhpParser\\Node>::processNode\(\)$#'
- '#Variable property access on PhpParser\\Node#'
-
identifier: shipmonk.deadMethod
message: '#^Unused .*?Factory::create#' # likely used in DIC
-
identifier: shipmonk.deadMethod
paths:
- ../tests/PHPStan/Tests
- ../tests/e2e
-
identifier: shipmonk.deadConstant
paths:
- ../tests/PHPStan/Fixture
reportUnmatched: false # constants on enums, not reported on PHP8-
-
message: '''
#^Access to constant on deprecated class DeprecatedAnnotations\\DeprecatedFoo\:
in 1\.0\.0\.$#
'''
path: ../tests/PHPStan/Reflection/Annotations/DeprecatedAnnotationsTest.php
-
message: '''
#^Access to constant on deprecated class DeprecatedAnnotations\\DeprecatedWithMultipleTags\:
in Foo 1\.1\.0 and will be removed in 1\.5\.0, use
\\Foo\\Bar\\NotDeprecated instead\.$#
'''
path: ../tests/PHPStan/Reflection/Annotations/DeprecatedAnnotationsTest.php
-
message: '#^Variable property access on T of PHPStan\\Rules\\RuleError\.$#'
path: ../src/Rules/RuleErrorBuilder.php
-
message: "#^Parameter \\#1 (?:\\$argument|\\$objectOrClass) of class ReflectionClass constructor expects class\\-string\\<PHPStan\\\\ExtensionInstaller\\\\GeneratedConfig\\>\\|PHPStan\\\\ExtensionInstaller\\\\GeneratedConfig, 'PHPStan…' given\\.$#"
count: 1
path: ../src/Command/CommandHelper.php
-
message: "#^Parameter \\#1 (?:\\$argument|\\$objectOrClass) of class ReflectionClass constructor expects class\\-string\\<PHPStan\\\\ExtensionInstaller\\\\GeneratedConfig\\>\\|PHPStan\\\\ExtensionInstaller\\\\GeneratedConfig, 'PHPStan…' given\\.$#"
count: 1
path: ../src/Diagnose/PHPStanDiagnoseExtension.php
- identifier: ternary.shortNotAllowed
-
identifier: shipmonk.deadMethod
path: ../src/Internal/CombinationsHelper.php
reportUnmatched: false
reportStaticMethodSignatures: true
tmpDir: %rootDir%/tmp
stubFiles:
- stubs/ReactChildProcess.stub
- stubs/ReactStreams.stub
- stubs/NetteDIContainer.stub
- stubs/PhpParserName.stub
- stubs/PhpParserNode.stub
- stubs/PhpParserExpr.stub
- stubs/PhpParserStmt.stub
- stubs/Identifier.stub
rules:
- PHPStan\Build\FinalClassRule
- PHPStan\Build\AttributeNamedArgumentsRule
- PHPStan\Build\NamedArgumentsRule
- PHPStan\Build\OverrideAttributeThirdPartyMethodRule
- PHPStan\Build\SkipTestsWithRequiresPhpAttributeRule
- PHPStan\Build\MemoizationPropertyRule
- PHPStan\Build\OrChainIdenticalComparisonToInArrayRule
services:
-
class: PHPStan\Build\ServiceLocatorDynamicReturnTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
-
class: PHPStan\Build\ContainerDynamicReturnTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension