forked from TYPO3/typo3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon
263 lines (232 loc) · 11.8 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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
includes:
- vendor/friendsoftypo3/phpstan-typo3/extension.neon
- Build/phpstan.level8.neon
# 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
# Set to true during local runs to find unmatched ignored errors. bamboo needs this to be set to false.
reportUnmatchedIgnoredErrors: false
scanDirectories:
- %currentWorkingDirectory%/typo3/sysext/
paths:
- %currentWorkingDirectory%/typo3/sysext/
excludes_analyse:
- %currentWorkingDirectory%/typo3/sysext/*/Tests/*
- %currentWorkingDirectory%/typo3/sysext/*/Documentation/*
- %currentWorkingDirectory%/typo3/sysext/*/Resources/*
- %currentWorkingDirectory%/typo3/sysext/*/Configuration/*
ignoreErrors:
# PHP8 compatibility, as phpstan cannot detect this yet.
- "#Class GdImage not found.#"
# 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 PDO\\:\\:SQLSRV_ENCODING_BINARY\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/Driver/PDOSqlsrv/Statement.php
-
message: "#^Access to undefined constant TYPO3\\\\CMS\\\\Core\\\\Type\\\\Enumeration\\:\\:__default\\.$#"
count: 1
path: typo3/sysext/core/Classes/Type/Enumeration.php
-
message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Fluid\\\\Core\\\\Widget\\\\AbstractWidgetViewHelper\\:\\:getArguments\\(\\)\\.$#"
count: 1
path: typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetViewHelper.php
-
message: "#^Call to an undefined static method TYPO3Fluid\\\\Fluid\\\\Core\\\\ViewHelper\\\\AbstractViewHelper\\:\\:onClose\\(\\)\\.$#"
count: 1
path: typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetViewHelper.php
-
message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Fluid\\\\Core\\\\Widget\\\\AbstractWidgetViewHelper\\:\\:getChildren\\(\\)\\.$#"
count: 1
path: typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetViewHelper.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: "#^Class TYPO3Fluid\\\\Fluid\\\\Core\\\\Parser\\\\TemplateParser does not have a constructor and must be instantiated without any parameters\\.$#"
count: 1
path: typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.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: "#^Variable \\$column in isset\\(\\) always exists and is not nullable\\.$#"
count: 1
path: typo3/sysext/workspaces/Classes/Service/GridDataService.php
-
message: "#^Constructor of class TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController has an unused parameter \\$_2\\.$#"
count: 1
path: typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.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 2
-
message: "#^Method TYPO3\\\\CMS\\\\Core\\\\Resource\\\\Processing\\\\ImageCropScaleMaskTask\\:\\:fileNeedsProcessing\\(\\) should return bool but return statement is missing\\.$#"
count: 1
path: typo3/sysext/core/Classes/Resource/Processing/ImageCropScaleMaskTask.php
# Ignored errors for level 3
-
message: "#^Property TYPO3\\\\CMS\\\\Belog\\\\Domain\\\\Model\\\\LogEntry\\:\\:\\$tableName \\(string\\) does not accept default value of type int\\.$#"
count: 1
path: typo3/sysext/belog/Classes/Domain/Model/LogEntry.php
-
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
# Ignored errors for level 4
-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: typo3/sysext/backend/Classes/Security/CategoryPermissionsAspect.php
-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: typo3/sysext/frontend/Classes/Aspect/FileMetadataOverlayAspect.php
-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: typo3/sysext/indexed_search/Classes/Lexer.php
-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: typo3/sysext/scheduler/Classes/Task/FileStorageIndexingAdditionalFieldProvider.php
-
message: "#^Ternary operator condition is always false\\.$#"
count: 1
path: typo3/sysext/backend/Classes/Form/Element/SelectCheckBoxElement.php
-
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 \\$var of function count expects array\\|Countable, string given\\.$#"
count: 2
path: typo3/sysext/core/Classes/Database/QueryGenerator.php
-
message: "#^Parameter \\#1 \\$input of function array_slice expects array, string given\\.$#"
count: 2
path: typo3/sysext/core/Classes/Database/QueryGenerator.php
-
message: "#^Parameter \\#1 \\$stack of function array_shift expects array, string given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/QueryGenerator.php
-
message: "#^Parameter \\#1 \\$arr1 of function array_merge expects array, string given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/QueryGenerator.php
-
message: "#^Parameter \\#3 \\.\\.\\.\\$args of function array_merge expects array, string given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/QueryGenerator.php
-
message: "#^Parameter \\#2 \\$suffix of method TYPO3\\\\CMS\\\\Core\\\\Database\\\\QueryGenerator\\:\\:cleanInputVal\\(\\) expects string, int given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/QueryGenerator.php
-
message: "#^Parameter \\#3 \\$draw of method TYPO3\\\\CMS\\\\Core\\\\Database\\\\QueryGenerator\\:\\:mkOperatorSelect\\(\\) expects bool, int given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/QueryGenerator.php
-
message: "#^Parameter \\#2 \\$first of method TYPO3\\\\CMS\\\\Core\\\\Database\\\\QueryGenerator\\:\\:getQuerySingle\\(\\) expects bool, int given\\.$#"
count: 2
path: typo3/sysext/core/Classes/Database/QueryGenerator.php
-
message: "#^Parameter \\#2 \\$item of static method TYPO3\\\\CMS\\\\Core\\\\Utility\\\\GeneralUtility\\:\\:inList\\(\\) expects string, \\(float\\|int\\) given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/QueryGenerator.php
-
message: "#^Parameter \\#2 \\$first of method TYPO3\\\\CMS\\\\Core\\\\Database\\\\QueryGenerator\\:\\:getUserDefQuery\\(\\) expects bool, int given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/QueryGenerator.php
-
message: "#^Parameter \\#2 \\$time of static method DateTime\\:\\:createFromFormat\\(\\) expects string, int\\|string given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/QueryGenerator.php
-
message: "#^Parameter \\#2 \\$replace of function str_replace expects array\\|string, int given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/QueryGenerator.php
-
message: "#^Parameter \\#1 \\$str of function trim expects string, array\\|string given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/QueryGenerator.php
-
message: "#^Parameter \\#2 \\$timestamp of function date expects int, int\\|false given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/QueryGenerator.php
-
message: "#^Parameter \\#2 \\$storeIndex of method TYPO3\\\\CMS\\\\Core\\\\Database\\\\QueryView\\:\\:loadStoreQueryConfigs\\(\\) expects int, string given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/QueryView.php
-
message: "#^Parameter \\#2 \\$index of method TYPO3\\\\CMS\\\\Core\\\\Database\\\\QueryView\\:\\:addToStoreQueryConfigs\\(\\) expects int, int\\|string\\|null given\\.$#"
count: 1
path: typo3/sysext/core/Classes/Database/QueryView.php
-
message: "#^Parameter \\#2 \\$timestamp of function strftime expects int, string given\\.$#"
count: 3
path: typo3/sysext/core/Classes/Database/QueryView.php
-
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