-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpsalm.xml.dist
457 lines (442 loc) · 22.5 KB
/
psalm.xml.dist
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
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
<?xml version="1.0"?>
<psalm
errorLevel="2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="lib/Doctrine/DBAL" />
<directory name="tests/Doctrine/StaticAnalysis" />
<directory name="tests/Doctrine/Tests" />
<ignoreFiles>
<directory name="vendor" />
<!-- See https://github.com/doctrine/dbal/pull/3906 -->
<directory name="lib/Doctrine/DBAL/Sharding" />
<directory name="tests/Doctrine/Tests/DBAL/Sharding" />
</ignoreFiles>
</projectFiles>
<stubs>
<file name="vendor/jetbrains/phpstorm-stubs/PDO/PDO.php" />
<file name="vendor/jetbrains/phpstorm-stubs/ibm_db2/ibm_db2.php" />
<file name="vendor/jetbrains/phpstorm-stubs/mysqli/mysqli.php" />
<file name="vendor/jetbrains/phpstorm-stubs/oci8/oci8.php" />
<file name="vendor/jetbrains/phpstorm-stubs/pgsql/pgsql.php" />
<file name="vendor/jetbrains/phpstorm-stubs/sqlsrv/sqlsrv.php" />
</stubs>
<issueHandlers>
<ConflictingReferenceConstraint>
<errorLevel type="suppress">
<!--
This one is just too convoluted for Psalm to figure out, by
its author's own admission
-->
<file name="lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php"/>
</errorLevel>
</ConflictingReferenceConstraint>
<!--
The library uses its own deprecated APIs for backward compatibility.
This list of suppressed issues should be revisited each major release.
-->
<DeprecatedClass>
<errorLevel type="suppress">
<directory name="lib"/>
<directory name="tests"/>
</errorLevel>
</DeprecatedClass>
<DeprecatedConstant>
<errorLevel type="suppress">
<!--
This suppression should be removed in 3.0.x
See https://github.com/doctrine/dbal/pull/4082
-->
<file name="lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php"/>
<!--
These suppressions should be removed in 3.0.x
See https://github.com/doctrine/dbal/pull/4082
-->
<file name="lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php"/>
<file name="lib/Doctrine/DBAL/Types/JsonArrayType.php"/>
<file name="lib/Doctrine/DBAL/Types/Type.php"/>
<file name="tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php"/>
<file name="tests/Doctrine/Tests/DBAL/Types/JsonArrayTest.php"/>
</errorLevel>
</DeprecatedConstant>
<DeprecatedInterface>
<errorLevel type="suppress">
<directory name="lib"/>
<directory name="tests"/>
</errorLevel>
</DeprecatedInterface>
<DeprecatedMethod>
<errorLevel type="suppress">
<directory name="lib"/>
<directory name="tests"/>
</errorLevel>
</DeprecatedMethod>
<DocblockTypeContradiction>
<errorLevel type="suppress">
<!--
These issues can be mostly divided in the following categories:
1. Union types not supported at the language level (require dropping PHP 7 support)
2. Associative arrays with typed elements used instead of classes (require breaking API changes)
-->
<file name="lib/Doctrine/DBAL/Connection.php"/>
<file name="lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php"/>
<file name="lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php"/>
<file name="lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php"/>
<file name="lib/Doctrine/DBAL/DriverManager.php"/>
<file name="lib/Doctrine/DBAL/Platforms/AbstractPlatform.php"/>
<file name="lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php"/>
<file name="lib/Doctrine/DBAL/Platforms/MySqlPlatform.php"/>
<file name="lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php"/>
<file name="lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php"/>
<file name="lib/Doctrine/DBAL/Platforms/SqlitePlatform.php"/>
<file name="lib/Doctrine/DBAL/Schema/Column.php"/>
<!--
These issues are fixed in 3.0
-->
<file name="tests/Doctrine/Tests/DBAL/Driver/PDO/ExceptionTest.php"/>
<file name="tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php"/>
<!--
This issue is fixed in 4.0
-->
<file name="lib/Doctrine/DBAL/Schema/Index.php"/>
</errorLevel>
</DocblockTypeContradiction>
<DuplicateClass>
<errorLevel type="suppress">
<!-- These files contain a php 7 and a php 8 version of the same trait -->
<file name="lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php"/>
<file name="lib/Doctrine/DBAL/Driver/PDOStatementImplementations.php"/>
</errorLevel>
</DuplicateClass>
<FalsableReturnStatement>
<errorLevel type="suppress">
<!--
Fixing these issues requires an API change
-->
<file name="lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php"/>
<file name="lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php"/>
<file name="lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php"/>
</errorLevel>
</FalsableReturnStatement>
<ForbiddenCode>
<errorLevel type="suppress">
<!-- See https://github.com/doctrine/dbal/pull/3934 -->
<file name="lib/Doctrine/DBAL/Logging/EchoSQLLogger.php"/>
<!-- The call to var_dump() here is by design -->
<file name="lib/Doctrine/DBAL/Tools/Dumper.php"/>
</errorLevel>
</ForbiddenCode>
<ImplicitToStringCast>
<errorLevel type="suppress">
<!-- See https://github.com/doctrine/dbal/pull/4082 -->
<file name="lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php"/>
</errorLevel>
</ImplicitToStringCast>
<ImplementedReturnTypeMismatch>
<errorLevel type="suppress">
<!-- See https://github.com/doctrine/dbal/pull/3906 -->
<file name="lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Driver.php"/>
<!-- See https://github.com/doctrine/dbal/pull/4030 -->
<file name="lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php"/>
<file name="lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php"/>
<!-- See https://github.com/doctrine/dbal/pull/3080 -->
<file name="lib/Doctrine/DBAL/Driver/PDOConnection.php"/>
<file name="lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php"/>
<file name="lib/Doctrine/DBAL/Driver/PDOStatementImplementations.php"/>
<!-- See https://github.com/doctrine/dbal/issues/4156 -->
<file name="lib/Doctrine/DBAL/Portability/Connection.php"/>
<!-- Fixing this issue requires an API change -->
<file name="lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php"/>
</errorLevel>
</ImplementedReturnTypeMismatch>
<InvalidNullableReturnType>
<errorLevel type="suppress">
<!-- See https://github.com/doctrine/dbal/pull/4082 -->
<file name="lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php"/>
<!-- See https://github.com/doctrine/dbal/issues/4503 -->
<file name="lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php"/>
</errorLevel>
</InvalidNullableReturnType>
<InvalidPropertyAssignmentValue>
<errorLevel type="suppress">
<!-- Fixing this issue requires an API change -->
<file name="lib/Doctrine/DBAL/Driver/PDOException.php"/>
<!-- See https://github.com/doctrine/dbal/pull/3548 -->
<file name="lib/Doctrine/DBAL/Connection.php"/>
</errorLevel>
</InvalidPropertyAssignmentValue>
<MethodSignatureMismatch>
<errorLevel type="suppress">
<!--
This one is clearly deliberate; it's a hack to adapt \PDO to
Doctrine\DBAL\Driver\Connection
-->
<file name="lib/Doctrine/DBAL/Driver/PDOConnection.php"/>
<file name="lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php"/>
<file name="lib/Doctrine/DBAL/Driver/PDOStatementImplementations.php"/>
</errorLevel>
</MethodSignatureMismatch>
<MissingConstructor>
<errorLevel type="suppress">
<!--
This suppression should be removed in 3.1.x
See https://github.com/doctrine/dbal/issues/4512
-->
<file name="lib/Doctrine/DBAL/Driver/SQLSrv/LastInsertId.php"/>
<!--
This suppression should be removed in 4.0.x
See https://github.com/doctrine/dbal/pull/3712
-->
<file name="lib/Doctrine/DBAL/Schema/SchemaConfig.php"/>
</errorLevel>
</MissingConstructor>
<NonInvariantDocblockPropertyType>
<errorLevel type="suppress">
<!--
This suppression should be removed in 3.0.x
https://github.com/doctrine/dbal/pull/4007
-->
<file name="tests/Doctrine/Tests/DBAL/Functional/Connection/BackwardCompatibility/Statement.php"/>
</errorLevel>
</NonInvariantDocblockPropertyType>
<NullableReturnStatement>
<errorLevel type="suppress">
<!--
Fixing this issue requires an API change
-->
<file name="lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php"/>
<!-- See https://github.com/doctrine/dbal/issues/4503 -->
<file name="lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php"/>
</errorLevel>
</NullableReturnStatement>
<ParamNameMismatch>
<errorLevel type="suppress">
<!--
These traits contain implementations for different PHP versions in order to handle a signature
change. At least one of the implementations won't match the signature expected by Psalm.
-->
<file name="lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php"/>
<file name="lib/Doctrine/DBAL/Driver/PDOStatementImplementations.php"/>
</errorLevel>
</ParamNameMismatch>
<PossiblyInvalidOperand>
<errorLevel type="suppress">
<!--
This code relies on certain elements of a mixed-type array to be of a certain type.
-->
<file name="lib/Doctrine/DBAL/SQLParserUtils.php"/>
</errorLevel>
</PossiblyInvalidOperand>
<PossiblyUndefinedArrayOffset>
<errorLevel type="suppress">
<!-- See https://github.com/doctrine/dbal/pull/3606 -->
<file name="lib/Doctrine/DBAL/Driver/AbstractDB2Driver.php"/>
<file name="lib/Doctrine/DBAL/Driver/AbstractOracleDriver.php"/>
<!-- See https://github.com/psalm/psalm-plugin-phpunit/pull/82 -->
<file name="tests/Doctrine/Tests/DBAL/Connections/MasterSlaveConnectionTest.php"/>
<file name="tests/Doctrine/Tests/DBAL/Functional/MasterSlaveConnectionTest.php"/>
<file name="tests/Doctrine/Tests/DBAL/Functional/PrimaryReadReplicaConnectionTest.php"/>
<file name="tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php"/>
</errorLevel>
</PossiblyUndefinedArrayOffset>
<PossiblyNullArgument>
<errorLevel type="suppress">
<!--
This suppression should be removed in 3.0.x
See https://github.com/doctrine/dbal/pull/3488
-->
<file name="lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php"/>
<!--
This suppression should be removed in 3.0.x
See https://github.com/doctrine/dbal/pull/4157
-->
<file name="lib/Doctrine/DBAL/Portability/Statement.php"/>
</errorLevel>
</PossiblyNullArgument>
<PossiblyNullIterator>
<errorLevel type="suppress">
<!--
This suppression should be removed in 4.0.x
See https://github.com/doctrine/dbal/pull/3712
-->
<file name="lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php"/>
</errorLevel>
</PossiblyNullIterator>
<PossiblyFalseReference>
<errorLevel type="suppress">
<!--
oci_new_descriptor() returns OCI-Lob|false on PHP 7 and OCILob|null on PHP 8
-->
<file name="lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php"/>
</errorLevel>
</PossiblyFalseReference>
<PropertyNotSetInConstructor>
<errorLevel type="suppress">
<!-- See https://github.com/psalm/psalm-plugin-phpunit/issues/107 -->
<!-- See https://github.com/sebastianbergmann/phpunit/pull/4610 -->
<directory name="tests"/>
<!-- See https://github.com/doctrine/dbal/issues/4506 -->
<file name="lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php"/>
<!--
This suppression should be removed in 3.0.x
See https://github.com/doctrine/dbal/pull/3803
-->
<file name="lib/Doctrine/DBAL/Driver/PDO/SQLSrv/Statement.php"/>
<file name="lib/Doctrine/DBAL/Driver/PDO/Statement.php"/>
<file name="lib/Doctrine/DBAL/Driver/PDOSqlsrv/Statement.php"/>
<file name="lib/Doctrine/DBAL/Driver/PDOStatement.php"/>
<!--
This suppression should be removed in 4.0.x
See https://github.com/doctrine/dbal/pull/3712
-->
<file name="lib/Doctrine/DBAL/Schema/Column.php"/>
<file name="lib/Doctrine/DBAL/Schema/Identifier.php"/>
<file name="lib/Doctrine/DBAL/Schema/Index.php"/>
<file name="lib/Doctrine/DBAL/Schema/Schema.php"/>
<file name="lib/Doctrine/DBAL/Schema/Sequence.php"/>
<file name="lib/Doctrine/DBAL/Schema/Table.php"/>
<file name="lib/Doctrine/DBAL/Schema/View.php"/>
</errorLevel>
</PropertyNotSetInConstructor>
<!-- This is necessary pre 4.0 -->
<RedundantCastGivenDocblockType>
<errorLevel type="suppress">
<!--
This suppression should be removed in 4.0.x
where we have scalar argument types enforced
-->
<directory name="lib"/>
</errorLevel>
</RedundantCastGivenDocblockType>
<RedundantConditionGivenDocblockType>
<errorLevel type="suppress">
<!--
Fixing these issues requires support of union types at the language level
or breaking API changes.
-->
<file name="lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php"/>
<file name="lib/Doctrine/DBAL/Platforms/MySqlPlatform.php"/>
<!--
These issues are fixed in 3.0
-->
<file name="lib/Doctrine/DBAL/Tools/Console/ConsoleRunner.php"/>
<file name="tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php"/>
</errorLevel>
</RedundantConditionGivenDocblockType>
<RedundantFunctionCallGivenDocblockType>
<errorLevel type="suppress">
<!-- see https://github.com/vimeo/psalm/issues/7536 -->
<file name="lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php"/>
</errorLevel>
</RedundantFunctionCallGivenDocblockType>
<ReferenceConstraintViolation>
<errorLevel type="suppress">
<!--
This suppression should be removed in 4.0.x
See https://github.com/doctrine/dbal/pull/3836
-->
<file name="lib/Doctrine/DBAL/Query/QueryBuilder.php"/>
</errorLevel>
</ReferenceConstraintViolation>
<ReservedWord>
<errorLevel type="suppress">
<!-- This file uses the mixed type in a PHP 8 forward compatibility layer. -->
<file name="lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php"/>
</errorLevel>
</ReservedWord>
<TooManyArguments>
<errorLevel type="suppress">
<!-- See https://github.com/doctrine/dbal/pull/3080 -->
<file name="lib/Doctrine/DBAL/Connection.php"/>
<file name="tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgSql/DriverTest.php"/>
<!-- See https://github.com/doctrine/dbal/pull/3562 -->
<file name="lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php"/>
<file name="lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php"/>
</errorLevel>
</TooManyArguments>
<UndefinedConstant>
<errorLevel type="suppress">
<directory name="lib/Doctrine/DBAL/Driver/SQLAnywhere"/>
</errorLevel>
</UndefinedConstant>
<UndefinedFunction>
<errorLevel type="suppress">
<directory name="lib/Doctrine/DBAL/Driver/SQLAnywhere"/>
</errorLevel>
</UndefinedFunction>
<UndefinedClass>
<errorLevel type="suppress">
<!-- Contains references to optional dependencies -->
<file name="lib/Doctrine/DBAL/Tools/Dumper.php"/>
</errorLevel>
</UndefinedClass>
<UnimplementedInterfaceMethod>
<errorLevel type="suppress">
<!--
Psalm doesn't support the proprietary annotations used in JeBrains PhpStorm stubs
like #[PhpStormStubsElementAvailable(...)]. This suppression should be removed in 3.0.x,
where https://github.com/doctrine/dbal/pull/4347 is no longer effective
-->
<file name="lib/Doctrine/DBAL/Driver/PDO/SQLSrv/Statement.php"/>
<file name="lib/Doctrine/DBAL/Driver/PDO/Statement.php"/>
<file name="lib/Doctrine/DBAL/Driver/PDOSqlsrv/Statement.php"/>
<file name="lib/Doctrine/DBAL/Driver/PDOStatement.php"/>
</errorLevel>
</UnimplementedInterfaceMethod>
<InvalidArgument>
<errorLevel type="suppress">
<!-- See https://github.com/doctrine/dbal/pull/3803 -->
<file name="tests/Doctrine/Tests/DBAL/ConnectionTest.php"/>
<file name="tests/Doctrine/Tests/DBAL/DriverManagerTest.php"/>
</errorLevel>
</InvalidArgument>
<InvalidReturnStatement>
<errorLevel type="suppress">
<!-- lastInsertId has a return type that does not match the one defined in the interface-->
<file name="lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php"/>
<!--
This issue should be fixed in 4.0
-->
<file name="lib/Doctrine/DBAL/Statement.php"/>
</errorLevel>
</InvalidReturnStatement>
<InvalidReturnType>
<errorLevel type="suppress">
<!-- lastInsertId has a return type that does not match the one defined in the interface-->
<file name="lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php"/>
<!--
This issue should be fixed in 4.0
-->
<file name="lib/Doctrine/DBAL/Statement.php"/>
</errorLevel>
</InvalidReturnType>
<InvalidScalarArgument>
<errorLevel type="suppress">
<!-- See https://github.com/doctrine/dbal/pull/3498 -->
<file name="tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php"/>
<file name="tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php"/>
<file name="tests/Doctrine/Tests/DBAL/Platforms/DB2PlatformTest.php"/>
<file name="tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php"/>
<file name="tests/Doctrine/Tests/DBAL/Platforms/SQLAnywherePlatformTest.php"/>
<file name="tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php"/>
<!-- See https://github.com/doctrine/dbal/pull/3574 -->
<file name="tests/Doctrine/Tests/DBAL/Query/Expression/ExpressionBuilderTest.php"/>
<!-- See https://github.com/doctrine/dbal/pull/4007 -->
<file name="lib/Doctrine/DBAL/Driver/PDOStatement.php"/>
<!-- See https://github.com/doctrine/dbal/pull/3906 -->
<file name="tests/Doctrine/Tests/DBAL/Sharding/PoolingShardManagerTest.php"/>
<file name="tests/Doctrine/Tests/DBAL/Sharding/SQLAzure/FunctionalTest.php"/>
<file name="tests/Doctrine/Tests/DBAL/Sharding/SQLAzure/SQLAzureShardManagerTest.php"/>
<!-- See https://github.com/doctrine/dbal/pull/3241 -->
<file name="lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php"/>
<!-- See https://github.com/doctrine/dbal/issues/4318 -->
<file name="lib/Doctrine/DBAL/Types/ConversionException.php"/>
<!-- See https://bugs.php.net/bug.php?id=77591 -->
<referencedFunction name="db2_autocommit"/>
</errorLevel>
</InvalidScalarArgument>
</issueHandlers>
</psalm>