forked from shopware/shopware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
psalm.xml
320 lines (271 loc) · 15.4 KB
/
psalm.xml
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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
<?xml version="1.0"?>
<psalm
ensureArrayStringOffsetsExist="true"
findUnusedVariablesAndParams="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor-bin/psalm/vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src"/>
<ignoreFiles>
<directory name="vendor"/>
<directory name="src/Recovery"/>
<file name="src/Docs/Resources/current/60-references-internals/10-core/50-checkout-process/_examples/10-cart-example.php"/>
<file name="src/Docs/Resources/deprecated/2-internals/1-core/50-checkout-process/_examples/10-cart-example.php"/>
<!-- Would otherwise inspect node_modules directories of JS applications -->
<directory name="src/*/Resources/app" />
<!-- Compatibility fixes for doctrine annotation parser https://github.com/doctrine/annotations/issues/421 -->
<file name="src/Core/Framework/Compatibility/AnnotationReader.php"/>
<file name="src/Core/Framework/Compatibility/DocParser.php"/>
<!-- twig override -->
<file name="src/Core/Framework/Adapter/Twig/TwigEnvironment.php"/>
<!-- Remove with Symfony 6.0 Upgrade -->
<file name="src/Core/Content/Mail/Service/MailerTransportFactory.php"/>
</ignoreFiles>
</projectFiles>
<plugins>
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
<issueHandlers>
<UndefinedDocblockClass>
<errorLevel type="info">
<!-- Optional dependencies -->
<referencedClass name="Redis"/>
<!-- Psalm issue with templates in static methods -->
<referencedClass name="Shopware\Core\Framework\Adapter\Cache\TCachedContent"/>
</errorLevel>
</UndefinedDocblockClass>
<UnusedClosureParam>
<errorLevel type="info">
<file name="src/Core/Content/Test/Product/SalesChannel/Listing/CachedProductListingRouteTest.php"/>
<file name="src/Core/Content/Test/Category/SalesChannel/CachedCategoryRouteTest.php"/>
<file name="src/Core/Content/Test/Category/SalesChannel/CachedNavigationRouteTest.php"/>
</errorLevel>
</UnusedClosureParam>
<!-- Shopware related issues which are ignored -->
<UnusedMethodCall>
<errorLevel type="info">
<referencedMethod name="Symfony\Component\Config\Definition\Builder\NodeDefinition::end"/>
</errorLevel>
</UnusedMethodCall>
<UnusedFunctionCall>
<errorLevel type="info">
<file name="src/Core/Framework/Test/Migration/MigrationCollectionRuntimeTest.php"/>
</errorLevel>
</UnusedFunctionCall>
<MethodSignatureMismatch>
<errorLevel type="info">
<!-- Issue in Psalm Symfony plugin https://github.com/psalm/psalm-plugin-symfony/issues/147 -->
<file name="src/Core/Framework/Validation/DataBag/DataBag.php"/>
<file name="src/Core/DevOps/StaticAnalyze/StaticAnalyzeKernel.php"/>
</errorLevel>
</MethodSignatureMismatch>
<InvalidIterator>
<errorLevel type="info">
<!-- Seems to be an issue in the Psalm Symfony plugin -->
<file name="src/Core/Checkout/Cart/SalesChannel/CartItemAddRoute.php"/>
<file name="src/Core/Checkout/Cart/SalesChannel/CartItemUpdateRoute.php"/>
</errorLevel>
</InvalidIterator>
<InvalidCast>
<errorLevel type="info">
<file name="src/Core/Profiling/Twig/DoctrineExtension.php"/>
<file name="src/Core/Framework/Test/Seo/StorefrontSalesChannelTestHelper.php"/>
<file name="src/Core/Framework/Test/TestCaseBase/AdminApiTestBehaviour.php"/>
</errorLevel>
</InvalidCast>
<InvalidParamDefault>
<errorLevel type="info">
<file name="src/Core/Framework/DataAbstractionLayer/Search/EntitySearchResult.php"/>
</errorLevel>
</InvalidParamDefault>
<UndefinedConstant>
<errorLevel type="info">
<file name="src/Core/Framework/Test/Plugin/Util/PluginFinderTest.php"/>
<file name="src/Core/Framework/Test/TestCaseBase/KernelLifecycleManagerTest.php"/>
<file name="src/Core/Framework/Test/Plugin/KernelPluginLoader/DbalKernelPluginLoaderTest.php"/>
<file name="src/Core/Framework/Test/Plugin/KernelPluginLoader/StaticKernelPluginLoaderTest.php"/>
<file name="src/Core/Framework/Test/Plugin/KernelPluginLoader/ComposerPluginLoaderTest.php"/>
<file name="src/Core/Framework/Test/Plugin/KernelPluginIntegrationTest.php"/>
</errorLevel>
</UndefinedConstant>
<UndefinedClass>
<errorLevel type="info">
<referencedClass name="SwagTest\SwagTest"/>
</errorLevel>
</UndefinedClass>
<DuplicateClass>
<errorLevel type="info">
<file name="src/Core/Framework/Api/Sync/SyncBehavior.php"/>
<file name="src/Core/Framework/Api/Sync/SyncResult.php"/>
<file name="src/Core/Framework/DataAbstractionLayer/Field/Flag/AllowHtml.php" />
</errorLevel>
</DuplicateClass>
<UndefinedMethod>
<errorLevel type="suppress">
<referencedMethod name="Shopware\Core\Framework\Api\Sync\SyncBehavior::failOnError" />
<referencedMethod name="Composer\InstalledVersions::getallrawdata"/>
</errorLevel>
</UndefinedMethod>
<InaccessibleMethod>
<errorLevel type="info">
<file name="src/Core/Framework/Test/Update/UpdateControllerTest.php"/>
</errorLevel>
</InaccessibleMethod>
<NonInvariantDocblockPropertyType>
<errorLevel type="info">
<!-- The property $object typehint in the Responses is more specific than in the parent class-->
<file name="src/Core/**/**/**/**/*Response.php"/>
<file name="src/Core/**/**/**/*Response.php"/>
<file name="src/Core/**/**/*Response.php"/>
<!-- The property $storageName could be null here, but is only string in the parent class -->
<file name="src/Core/Framework/DataAbstractionLayer/Field/ReferenceVersionField.php"/>
<!-- Parent class from external library has no property type specified -->
<file name="src/Core/Framework/Demodata/Faker/Commerce.php"/>
</errorLevel>
</NonInvariantDocblockPropertyType>
<UnsafeInstantiation errorLevel="info">
<errorLevel type="info">
<file name="src/Core/Kernel.php"/>
</errorLevel>
</UnsafeInstantiation>
<ParamNameMismatch>
<errorLevel type="info">
<!-- Collections -->
<file name="src/Core/Checkout/Cart/Delivery/Struct/DeliveryPositionCollection.php"/>
<file name="src/Core/Checkout/Cart/LineItem/LineItemCollection.php"/>
<file name="src/Core/Checkout/Cart/Tax/Struct/CalculatedTaxCollection.php"/>
<file name="src/Core/Checkout/Cart/Tax/Struct/TaxRuleCollection.php"/>
<file name="src/Core/Content/Cms/Aggregate/CmsSlot/CmsSlotCollection.php"/>
<file name="src/Core/Content/ProductExport/Error/ErrorCollection.php"/>
<file name="src/Core/Content/ImportExport/Processing/Mapping/MappingCollection.php"/>
<file name="src/Core/Framework/DataAbstractionLayer/Search/AggregationResult/AggregationResultCollection.php"/>
<file name="src/Core/Framework/Rule/RuleCollection.php"/>
<file name="src/Core/Checkout/Cart/Error/ErrorCollection.php"/>
<file name="src/Core/Framework/App/Validation/Error/ErrorCollection.php"/>
<file name="src/Core/Framework/DataAbstractionLayer/CompiledFieldCollection.php"/>
<file name="src/Core/Framework/DataAbstractionLayer/EntityCollection.php"/>
<file name="src/Core/System/Snippet/Files/SnippetFileCollection.php"/>
<!-- I'm puzzled why these errors started appearing now -->
<file name="src/Core/Checkout/Document/FileGenerator/PdfGenerator.php"/>
<file name="src/Core/Checkout/Payment/Cart/Token/JWTFactoryV2.php"/>
<file name="src/Core/Checkout/Test/Cart/Common/FalseRule.php"/>
<file name="src/Core/Checkout/Test/Cart/Common/TrueRule.php"/>
<file name="src/Core/Content/Media/Message/GenerateThumbnailsHandler.php"/>
<file name="src/Core/Content/ProductExport/ScheduledTask/ProductExportPartialGenerationHandler.php"/>
<file name="src/Core/Content/Sitemap/ScheduledTask/SitemapGenerateTaskHandler.php"/>
<file name="src/Core/Framework/DataAbstractionLayer/Dbal/EntityWriteGateway.php"/>
<file name="src/Core/Framework/DataAbstractionLayer/Search/EntitySearchResult.php"/>
<file name="src/Core/Framework/MessageQueue/ScheduledTask/ScheduledTaskHandler.php"/>
<file name="src/Core/Framework/Struct/ArrayEntity.php"/>
<file name="src/Core/Migration/Test/NullConnection.php"/>
<file name="src/Elasticsearch/Profiler/ClientProfiler.php"/>
<!-- Implementations of interfaces have a more describing parameter name -->
<file name="src/Core/Checkout/Cart/LineItem/Group/Packager/*Packager.php"/>
<file name="src/Core/Checkout/Customer/Validation/Constraint/CustomerPasswordMatchesValidator.php"/>
<file name="src/Core/Checkout/Customer/Validation/Constraint/CustomerVatIdentificationValidator.php"/>
<file name="src/Core/Content/ImportExport/DataAbstractionLayer/Serializer/Field/*Serializer.php"/>
<file name="src/Storefront/Framework/Seo/SeoUrlRoute/*PageSeoUrlRoute.php"/>
<file name="src/Core/Framework/Test/Routing/TestRouteLoader.php"/>
</errorLevel>
</ParamNameMismatch>
<!-- Issue in Psalm https://github.com/vimeo/psalm/issues/2706 -->
<InaccessibleProperty>
<errorLevel type="info">
<file name="src/Core/Framework/Api/Controller/CacheController.php"/>
</errorLevel>
</InaccessibleProperty>
<!-- Remove when NEXT-15687 flag has been removed -->
<RedundantPropertyInitializationCheck>
<errorLevel type="suppress">
<file name="src/Storefront/Controller/StorefrontController.php"/>
</errorLevel>
</RedundantPropertyInitializationCheck>
<!-- level 3 issues - slightly lazy code writing, but provably low false-negatives -->
<DeprecatedMethod errorLevel="info"/>
<DeprecatedProperty errorLevel="info"/>
<DeprecatedClass errorLevel="info"/>
<DeprecatedConstant errorLevel="info"/>
<DeprecatedFunction errorLevel="info"/>
<DeprecatedInterface errorLevel="info"/>
<DeprecatedTrait errorLevel="info"/>
<InternalMethod errorLevel="info"/>
<InternalProperty errorLevel="info"/>
<InternalClass errorLevel="info"/>
<MissingClosureReturnType errorLevel="info"/>
<MissingReturnType errorLevel="info"/>
<MissingPropertyType errorLevel="info"/>
<InvalidDocblock errorLevel="info"/>
<PropertyNotSetInConstructor errorLevel="info"/>
<MissingConstructor errorLevel="info"/>
<MissingClosureParamType errorLevel="info"/>
<MissingParamType errorLevel="info"/>
<RedundantCondition errorLevel="info"/>
<DocblockTypeContradiction errorLevel="info"/>
<RedundantConditionGivenDocblockType errorLevel="info"/>
<UnresolvableInclude errorLevel="info"/>
<RawObjectIteration errorLevel="info"/>
<InvalidStringClass errorLevel="info"/>
<!-- level 4 issues - points to possible deficiencies in logic, higher false-positives -->
<MoreSpecificReturnType errorLevel="info"/>
<LessSpecificReturnStatement errorLevel="info"/>
<PropertyTypeCoercion errorLevel="info"/>
<ArgumentTypeCoercion errorLevel="info"/>
<PossiblyFalseReference errorLevel="info"/>
<PossiblyInvalidArrayAccess errorLevel="info"/>
<PossiblyInvalidArrayAssignment errorLevel="info"/>
<PossiblyInvalidCast errorLevel="info"/>
<PossiblyInvalidFunctionCall errorLevel="info"/>
<PossiblyInvalidIterator errorLevel="info"/>
<PossiblyInvalidMethodCall errorLevel="info"/>
<PossiblyNullArrayAccess errorLevel="info"/>
<PossiblyNullArrayAssignment errorLevel="info"/>
<PossiblyNullArrayOffset errorLevel="info"/>
<PossiblyNullIterator errorLevel="info"/>
<PossiblyNullPropertyFetch errorLevel="info"/>
<PossiblyNullReference errorLevel="info"/>
<PossiblyUndefinedVariable errorLevel="info"/>
<PossiblyUndefinedArrayOffset errorLevel="info"/>
<PossiblyUndefinedMethod errorLevel="info"/>
<!-- level 5 issues - should be avoided at mosts costs... -->
<ImplicitToStringCast errorLevel="info"/>
<InvalidScalarArgument errorLevel="info"/>
<InvalidOperand errorLevel="info"/>
<TooManyArguments errorLevel="info"/>
<TypeDoesNotContainType errorLevel="info"/>
<ImplementedReturnTypeMismatch errorLevel="info"/>
<!-- level 6 issues - really bad things -->
<InvalidNullableReturnType errorLevel="info"/>
<NullableReturnStatement errorLevel="info"/>
<InvalidFalsableReturnType errorLevel="info"/>
<FalsableReturnStatement errorLevel="info"/>
<MoreSpecificImplementedParamType errorLevel="info"/>
<InvalidReturnStatement errorLevel="info"/>
<InvalidReturnType errorLevel="info"/>
<UndefinedInterfaceMethod errorLevel="info"/>
<!-- level 7 issues - even worse -->
<UndefinedPropertyAssignment errorLevel="info"/>
<UndefinedThisPropertyFetch errorLevel="info"/>
<UndefinedPropertyFetch errorLevel="info"/>
<InvalidArgument errorLevel="info"/>
<InvalidPropertyAssignmentValue errorLevel="info"/>
<InvalidArrayOffset errorLevel="info"/>
<!-- Does not agree on a type with phpstan after the symfony 5.3 update -->
<RedundantCastGivenDocblockType errorLevel="info" />
<!-- Does not agree on a type with phpstan after the symfony 5.3 update -->
<RedundantCast>
<errorLevel type="info">
<file name="src/Core/Content/Product/SalesChannel/Listing/ProductListingFeaturesSubscriber.php"/>
</errorLevel>
</RedundantCast>
<!-- @deprecated tag:v6.4.5.0 (replacing production template dev-dependencies is not allowed atm) -->
<UndefinedClass>
<errorLevel type="info">
<file name="src/Core/Framework/Demodata/Generator/MediaGenerator.php" />
<file name="src/Core/Framework/Demodata/DemodataService.php" />
</errorLevel>
</UndefinedClass>
</issueHandlers>
</psalm>