forked from TYPO3/typo3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon
237 lines (222 loc) · 13.7 KB
/
phpstan.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
includes:
- vendor/friendsoftypo3/phpstan-typo3/extension.neon
- Build/phpstan.level8.neon
- Build/phpstan.php7config.php
- Build/phpstan.php8config.php
# Include bleeding edge rules if necessary but do not commit
# - vendor/phpstan/phpstan/conf/bleedingEdge.neon
parameters:
# Use local .cache dir instead of /tmp
tmpDir: .cache/phpstan
parallel:
# Don't be overly greedy on machines with more CPU's to be a good neighbor especially on CI
maximumNumberOfProcesses: 5
level: 2
# level 2 parameters which are set to opposite values in the original level 2 configuration. Parameters need to be
# set to their opposite values and the resulting errors need to be fixed. Once they are fixed, the parameters can be
# removed from this file.
checkThisOnly: true
checkPhpDocMissingReturn: false
reportUnmatchedIgnoredErrors: true
scanDirectories:
- %currentWorkingDirectory%/typo3/sysext/
paths:
- %currentWorkingDirectory%/typo3/sysext/
earlyTerminatingMethodCalls:
TYPO3\CMS\Core\Resource\InaccessibleFolder:
- throwInaccessibleException
excludes_analyse:
- %currentWorkingDirectory%/typo3/sysext/*/Tests/*
- %currentWorkingDirectory%/typo3/sysext/*/Documentation/*
- %currentWorkingDirectory%/typo3/sysext/*/Resources/*
- %currentWorkingDirectory%/typo3/sysext/*/Configuration/*
- %currentWorkingDirectory%/typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php
ignoreErrors:
- "#^Parameter \\#1 \\$disable of function libxml_disable_entity_loader expects bool, bool\\|null given\\.$#"
-
message: "#^Call to static method isPlatformPackage\\(\\) on an unknown class Composer\\\\Repository\\\\PlatformRepository\\.$#"
count: 1
path: typo3/sysext/core/Classes/Composer/PackageArtifactBuilder.php
-
message: "#^Instantiated class Composer\\\\Package\\\\Package not found\\.$#"
count: 1
path: typo3/sysext/core/Classes/Composer/PackageArtifactBuilder.php
-
message: "#^Instantiated class Composer\\\\Util\\\\Filesystem not found\\.$#"
count: 4
path: typo3/sysext/core/Classes/Composer/PackageArtifactBuilder.php
-
message: "#^Parameter \\$rootPackage of method TYPO3\\\\CMS\\\\Core\\\\Composer\\\\PackageArtifactBuilder\\:\\:handleRootPackage\\(\\) has invalid typehint type Composer\\\\Package\\\\PackageInterface\\.$#"
count: 1
path: typo3/sysext/core/Classes/Composer/PackageArtifactBuilder.php
-
message: "#^Parameter \\$filesystem of method TYPO3\\\\CMS\\\\Core\\\\Package\\\\Cache\\\\ComposerPackageArtifact\\:\\:__construct\\(\\) has invalid typehint type Composer\\\\Util\\\\Filesystem\\.$#"
count: 1
path: typo3/sysext/core/Classes/Package/Cache/ComposerPackageArtifact.php
-
message: "#^Property TYPO3\\\\CMS\\\\Core\\\\Package\\\\Cache\\\\ComposerPackageArtifact\\:\\:\\$filesystem has unknown class Composer\\\\Util\\\\Filesystem as its type\\.$#"
count: 1
path: typo3/sysext/core/Classes/Package/Cache/ComposerPackageArtifact.php
-
message: "#^Parameter \\$filesystem of method TYPO3\\\\CMS\\\\Core\\\\Package\\\\Package\\:\\:makePathRelative\\(\\) has invalid typehint type Composer\\\\Util\\\\Filesystem\\.$#"
count: 1
path: typo3/sysext/core/Classes/Package/Package.php
-
message: "#^PHPDoc tag @var for variable \\$composerPackage contains unknown class Composer\\\\Package\\\\PackageInterface\\.$#"
count: 1
path: typo3/sysext/core/Classes/Composer/PackageArtifactBuilder.php
# ignored errors for level 0
- '#Variable \$_EXTKEY might not be defined\.#'
-
message: '#Instantiated class Composer\\Util\\Filesystem not found\.#'
path: %currentWorkingDirectory%/typo3/sysext/core/Classes/Composer/CliEntryPoint.php
-
message: '#Parameter \$event of method [\w\\]+::\w+\(\) has invalid typehint type Composer\\Script\\Event\.#'
path: %currentWorkingDirectory%/typo3/sysext/*/Classes/Composer/*
-
message: "#^Access to undefined constant static\\(TYPO3\\\\CMS\\\\Core\\\\Type\\\\Enumeration\\)\\:\\:__default\\.$#"
count: 1
path: typo3/sysext/core/Classes/Type/Enumeration.php
-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
count: 1
path: typo3/sysext/core/Classes/Collection/AbstractRecordCollection.php
-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
count: 1
path: typo3/sysext/core/Classes/Type/Enumeration.php
-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
count: 1
path: typo3/sysext/workspaces/Classes/Domain/Record/WorkspaceRecord.php
-
message: "#^Call to an undefined static method TYPO3Fluid\\\\Fluid\\\\Core\\\\Rendering\\\\RenderingContext\\:\\:getParserConfiguration\\(\\)\\.$#"
count: 1
path: typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php
# ignored errors for level 1
-
message: "#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#"
count: 1
path: typo3/sysext/backend/Classes/Utility/BackendUtility.php
-
message: "#^Variable \\$pidConf in isset\\(\\) always exists and is not nullable\\.$#"
count: 1
path: typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
-
message: "#^Constructor of class TYPO3\\\\CMS\\\\Frontend\\\\Plugin\\\\AbstractPlugin has an unused parameter \\$_\\.$#"
count: 1
path: typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php
-
message: "#^Constructor of class TYPO3\\\\CMS\\\\RteCKEditor\\\\Form\\\\Resolver\\\\RichTextNodeResolver has an unused parameter \\$nodeFactory\\.$#"
count: 1
path: typo3/sysext/rte_ckeditor/Classes/Form/Resolver/RichTextNodeResolver.php
# Ignored errors for level 3
-
message: "#^Property TYPO3\\\\CMS\\\\Belog\\\\Domain\\\\Model\\\\LogEntry\\:\\:\\$newId \\(string\\) does not accept default value of type int\\.$#"
count: 1
path: typo3/sysext/belog/Classes/Domain/Model/LogEntry.php
# checkPhpDocMethodSignatures
-
message: "#^Return type \\(TYPO3\\\\CMS\\\\Core\\\\Database\\\\Query\\\\Expression\\\\ExpressionBuilder\\) of method TYPO3\\\\CMS\\\\Core\\\\Database\\\\Connection\\:\\:getExpressionBuilder\\(\\) should be compatible with return type \\(Doctrine\\\\DBAL\\\\Query\\\\Expression\\\\ExpressionBuilder\\) of method Doctrine\\\\DBAL\\\\Connection\\:\\:getExpressionBuilder\\(\\)$#"
count: 1
path: typo3/sysext/core/Classes/Database/Connection.php
-
message: "#^Return type \\(TYPO3\\\\CMS\\\\Core\\\\Database\\\\Query\\\\QueryBuilder\\) of method TYPO3\\\\CMS\\\\Core\\\\Database\\\\Connection\\:\\:createQueryBuilder\\(\\) should be compatible with return type \\(Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder\\) of method Doctrine\\\\DBAL\\\\Connection\\:\\:createQueryBuilder\\(\\)$#"
count: 1
path: typo3/sysext/core/Classes/Database/Connection.php
# TypesAssignedToPropertiesRule
-
message: "#^Property Doctrine\\\\DBAL\\\\Schema\\\\SchemaDiff\\:\\:\\$newTables \\(array\\<Doctrine\\\\DBAL\\\\Schema\\\\Table\\>\\) does not accept array\\<Doctrine\\\\DBAL\\\\Schema\\\\TableDiff\\>\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php
-
message: "#^Property Doctrine\\\\DBAL\\\\Schema\\\\SchemaDiff\\:\\:\\$removedTables \\(array\\<Doctrine\\\\DBAL\\\\Schema\\\\Table\\>\\) does not accept array\\<Doctrine\\\\DBAL\\\\Schema\\\\TableDiff\\>\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php
# Ignored errors for level 4
-
message: "#^Ternary operator condition is always true\\.$#"
count: 2
path: typo3/sysext/backend/Classes/Form/Element/SelectSingleElement.php
-
message: "#^Instanceof between TYPO3\\\\CMS\\\\Extbase\\\\Domain\\\\Model\\\\Category\\|null and TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\Generic\\\\LazyLoadingProxy will always evaluate to false\\.$#"
count: 1
path: typo3/sysext/extbase/Classes/Domain/Model/Category.php
-
message: "#^Instanceof between TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File and TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileReference will always evaluate to false\\.$#"
count: 1
path: typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
# Ignored errors for level 5
-
message: "#^Parameter \\#1 \\$constraint of static method TYPO3\\\\CMS\\\\Core\\\\Database\\\\Query\\\\QueryHelper\\:\\:stripLogicalOperatorPrefix\\(\\) expects string, string\\|null given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/QueryView.php
-
message: "#^Parameter \\#2 \\$id of method TYPO3\\\\CMS\\\\Core\\\\DataHandling\\\\DataHandler\\:\\:getRecordProperties\\(\\) expects int, int\\|string given\\.$#"
count: 2
path: typo3/sysext/core/Classes/DataHandling/DataHandler.php
-
message: "#^Parameter \\#5 \\$id of method TYPO3\\\\CMS\\\\Core\\\\DataHandling\\\\DataHandler\\:\\:checkValue_SW\\(\\) expects int, int\\|string given\\.$#"
count: 1
path: typo3/sysext/core/Classes/DataHandling/DataHandler.php
-
message: "#^Parameter \\#1 \\$stageRecord of method TYPO3\\\\CMS\\\\Workspaces\\\\Controller\\\\Remote\\\\ActionHandler\\:\\:getRecipientsOfStage\\(\\) expects int\\|TYPO3\\\\CMS\\\\Workspaces\\\\Domain\\\\Record\\\\StageRecord, TYPO3\\\\CMS\\\\Workspaces\\\\Domain\\\\Record\\\\StageRecord\\|null given\\.$#"
count: 1
path: typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php
-
message: "#^Parameter \\#4 \\$(col|color) of function imagefill expects int, int\\|false given\\.$#"
count: 1
path: typo3/sysext/frontend/Classes/Imaging/GifBuilder.php
-
message: "#^Parameter \\#6 \\$(col|color) of function imagefilledrectangle expects int, int\\|false given\\.$#"
count: 1
path: typo3/sysext/frontend/Classes/Imaging/GifBuilder.php
-
message: "#^Parameter \\#1 \\$node of function dom_import_simplexml expects SimpleXMLElement, SimpleXMLElement\\|false given\\.$#"
count: 1
path: typo3/sysext/frontend/Classes/ContentObject/ScalableVectorGraphicsContentObject.php
-
message: "#^Parameter \\#1 \\$currentRequest of static method TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\Dispatcher\\:\\:buildRequestFromCurrentRequestAndForwardResponse\\(\\) expects TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\Request, TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\RequestInterface given\\.$#"
count: 1
path: typo3/sysext/extbase/Classes/Mvc/Dispatcher.php
-
message: "#^Parameter \\#1 \\$node of method TYPO3\\\\CMS\\\\Core\\\\Tree\\\\TableConfiguration\\\\ArrayTreeRenderer\\:\\:renderNode\\(\\) expects TYPO3\\\\CMS\\\\Backend\\\\Tree\\\\TreeRepresentationNode, TYPO3\\\\CMS\\\\Backend\\\\Tree\\\\TreeNode given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Tree/TableConfiguration/ArrayTreeRenderer.php
-
message: "#^Parameter \\#2 \\$folder of method TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ResourceStorage\\:\\:checkFolderActionPermission\\(\\) expects TYPO3\\\\CMS\\\\Core\\\\Resource\\\\Folder\\|null, TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FolderInterface given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Resource/ResourceStorage.php
-
message: "#^Parameter \\#1 \\$file of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\Event\\\\AfterFileAddedEvent constructor expects TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileInterface, TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\|TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ProcessedFile\\|null given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Resource/ResourceStorage.php
-
message: "#^Parameter \\#1 \\$file of method TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ResourceStorage\\:\\:replaceFile\\(\\) expects TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileInterface, TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\|TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ProcessedFile\\|null given\\.$#"
count: 2
path: typo3/sysext/core/Classes/Resource/ResourceStorage.php
-
message: "#^Parameter \\#2 \\$package of method TYPO3\\\\CMS\\\\Core\\\\DependencyInjection\\\\ServiceProviderRegistry\\:\\:create\\(\\) expects TYPO3\\\\CMS\\\\Core\\\\Package\\\\Package\\|null, TYPO3\\\\CMS\\\\Core\\\\Package\\\\PackageInterface given\\.$#"
count: 1
path: typo3/sysext/core/Classes/DependencyInjection/ServiceProviderRegistry.php
-
message: "#^Parameter \\#1 \\$(name|function) of class ReflectionFunction constructor expects Closure\\|string, callable\\(\\)\\: mixed given\\.$#"
count: 1
path: typo3/sysext/core/Classes/DependencyInjection/ServiceProviderCompilationPass.php
-
message: "#^Parameter \\#1 \\$manifest of method TYPO3\\\\CMS\\\\Core\\\\Core\\\\ClassLoadingInformationGenerator\\:\\:getAutoloadSectionFromManifest\\(\\) expects stdClass, object given\\.$#"
count: 2
path: typo3/sysext/core/Classes/Core/ClassLoadingInformationGenerator.php
-
message: "#^Parameter \\#2 \\$callback of function array_walk expects callable\\(\\)\\: mixed, array\\(\\$this\\(TYPO3\\\\CMS\\\\Core\\\\Cache\\\\Backend\\\\AbstractBackend\\), 'flushByTag'\\) given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Cache/Backend/AbstractBackend.php
-
message: "#^Parameter \\#1 \\$node of method TYPO3\\\\CMS\\\\Backend\\\\Tree\\\\Renderer\\\\UnorderedListTreeRenderer\\:\\:renderNode\\(\\) expects TYPO3\\\\CMS\\\\Backend\\\\Tree\\\\TreeRepresentationNode, TYPO3\\\\CMS\\\\Backend\\\\Tree\\\\TreeNode given\\.$#"
count: 1
path: typo3/sysext/backend/Classes/Tree/Renderer/UnorderedListTreeRenderer.php
-
# Obsolete in v12, when either entire Request or __construct() are declared final
message: "#^Unsafe usage of new static\\(\\)\\.$#"
count: 14
path: typo3/sysext/extbase/Classes/Mvc/Request.php