forked from shopware/shopware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpsalm.xml
231 lines (194 loc) · 10.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
<?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 ../dev-ops/analyze/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" />
</ignoreFiles>
</projectFiles>
<plugins>
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
<issueHandlers>
<!-- Optional dependencies -->
<UndefinedDocblockClass>
<errorLevel type="info">
<referencedClass name="Redis"/>
</errorLevel>
</UndefinedDocblockClass>
<!-- 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"/>
</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>
<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/KernelPluginIntegrationTest.php"/>
</errorLevel>
</UndefinedConstant>
<UndefinedClass>
<errorLevel type="info">
<referencedClass name="SwagTest\SwagTest"/>
</errorLevel>
</UndefinedClass>
<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"/>
<!-- 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"/>
</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>
<!-- 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"/>
</issueHandlers>
</psalm>