forked from doctrine/dbal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
psalm.xml.dist
501 lines (496 loc) · 24.1 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
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
<?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="src" />
<directory name="static-analysis" />
<directory name="tests" />
<ignoreFiles>
<directory name="vendor" />
</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>
<ArgumentTypeCoercion>
<errorLevel type="suppress">
<!--
See https://github.com/composer/package-versions-deprecated/pull/12
-->
<file name="src/Tools/Console/ConsoleRunner.php"/>
</errorLevel>
</ArgumentTypeCoercion>
<ConflictingReferenceConstraint>
<errorLevel type="suppress">
<!--
This one is just too convoluted for Psalm to figure out, by
its author's own admission
-->
<file name="src/Driver/OCI8/ConvertPositionalToNamedPlaceholders.php"/>
</errorLevel>
</ConflictingReferenceConstraint>
<DeprecatedClass>
<errorLevel type="suppress">
<!--
This suppression should be removed in 4.0.0.
-->
<referencedClass name="Doctrine\DBAL\Id\TableGenerator"/>
<referencedClass name="Doctrine\DBAL\Id\TableGeneratorSchemaVisitor"/>
<!--
TODO: remove in 4.0.0
-->
<referencedClass name="Doctrine\DBAL\Driver\ServerInfoAwareConnection"/>
<referencedClass name="Doctrine\DBAL\VersionAwarePlatformDriver"/>
<!--
TODO: remove in 4.0.0
-->
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\MariaDb102Keywords"/>
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\MySQL57Keywords"/>
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords"/>
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\PostgreSQL94Keywords"/>
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\SQLServer2012Keywords"/>
<referencedClass name="Doctrine\DBAL\Platforms\MariaDb1027Platform"/>
<referencedClass name="Doctrine\DBAL\Platforms\MySQL57Platform"/>
<referencedClass name="Doctrine\DBAL\Platforms\PostgreSQL100Platform"/>
<referencedClass name="Doctrine\DBAL\Platforms\PostgreSQL94Platform"/>
<referencedClass name="Doctrine\DBAL\Platforms\SQLServer2012Platform"/>
<!--
TODO: remove in 4.0.0
-->
<referencedClass name="Doctrine\DBAL\Schema\Constraint"/>
<!--
TODO: remove in 4.0.0
See https://github.com/doctrine/dbal/pull/4967
-->
<referencedClass name="Doctrine\DBAL\Logging\DebugStack"/>
<referencedClass name="Doctrine\DBAL\Logging\SQLLogger"/>
<referencedClass name="Doctrine\DBAL\Logging\LoggerChain"/>
</errorLevel>
</DeprecatedClass>
<DeprecatedInterface>
<errorLevel type="suppress">
<!--
TODO: remove in 4.0.0
-->
<referencedClass name="Doctrine\DBAL\Driver\ServerInfoAwareConnection"/>
<referencedClass name="Doctrine\DBAL\VersionAwarePlatformDriver"/>
<!--
TODO: remove in 4.0.0
-->
<referencedClass name="Doctrine\DBAL\Schema\Constraint"/>
<!--
TODO: remove in 4.0.0
See https://github.com/doctrine/dbal/pull/4967
-->
<referencedClass name="Doctrine\DBAL\Logging\SQLLogger"/>
</errorLevel>
</DeprecatedInterface>
<DeprecatedMethod>
<errorLevel type="suppress">
<!--
This suppression should be removed after 2022
See https://github.com/doctrine/dbal/pull/4317
-->
<file name="tests/Functional/LegacyAPITest.php"/>
<!--
This suppression should be removed in 4.0.0.
-->
<file name="src/Platforms/AbstractPlatform.php"/>
<!--
This suppression should be removed in 4.0.x
See https://github.com/doctrine/dbal/pull/3865
-->
<file name="src/Query/Expression/CompositeExpression.php"/>
<file name="tests/Query/Expression/CompositeExpressionTest.php"/>
<file name="tests/Query/Expression/ExpressionBuilderTest.php"/>
<!--
This suppression should be removed in 4.0.x
See https://github.com/doctrine/dbal/pull/4518
-->
<file name="src/Query/QueryBuilder.php"/>
<file name="src/Tools/Console/Command/ReservedWordsCommand.php"/>
<!--
This suppression should be removed in 4.0.x
-->
<file name="src/Schema/AbstractSchemaManager.php" />
<file name="src/Schema/PostgreSQLSchemaManager.php" />
<!--
See https://github.com/doctrine/dbal/pull/4518
TODO: remove in 4.0.0
-->
<referencedMethod name="Doctrine\DBAL\Connection::getSchemaManager"/>
<!--
See https://github.com/doctrine/dbal/issues/4503
TODO: remove in 4.0.0
-->
<referencedMethod name="Doctrine\DBAL\Schema\AbstractSchemaManager::listNamespaceNames"/>
<referencedMethod name="Doctrine\DBAL\Schema\PostgreSQLSchemaManager::getSchemaNames"/>
<!--
See https://github.com/doctrine/dbal/pull/4722
TODO: remove in 4.0.0
-->
<referencedMethod name="Doctrine\DBAL\Schema\Comparator::compare" />
<!--
See https://github.com/doctrine/dbal/pull/4578
TODO: remove in 4.0.0
-->
<referencedMethod name="Doctrine\DBAL\Query\QueryBuilder::execute" />
<referencedMethod name="Doctrine\DBAL\Statement::execute"/>
<!--
TODO: remove in 4.0.0
-->
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getBinaryDefaultLength"/>
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getBinaryMaxLength"/>
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getIsNullExpression"/>
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getUniqueFieldDeclarationSQL"/>
<!--
See https://github.com/doctrine/dbal/pull/5058
TODO: remove in 4.0.0
-->
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::isCommentedDoctrineType"/>
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::initializeCommentedDoctrineTypes"/>
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::markedDoctrineTypeCommented"/>
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::supportsAlterTable"/>
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::supportsViews"/>
<!--
See https://github.com/doctrine/dbal/pull/4742
TODO: remove in 4.0.0
-->
<referencedMethod name="Doctrine\DBAL\Schema\ForeignKeyConstraint::getLocalTable"/>
<referencedMethod name="Doctrine\DBAL\Schema\ForeignKeyConstraint::getLocalTableName"/>
<referencedMethod name="Doctrine\DBAL\Schema\ForeignKeyConstraint::setLocalTable"/>
<!--
TODO: remove in 4.0.0
-->
<referencedMethod name="Doctrine\DBAL\Schema\Schema::getMigrateToSql"/>
<!--
TODO: remove in 4.0.0
-->
<referencedMethod name="Doctrine\DBAL\Platforms\OraclePlatform::assertValidIdentifier"/>
<!--
TODO: remove in 4.0.0
See https://github.com/doctrine/dbal/pull/4822
-->
<referencedMethod name="Doctrine\DBAL\Schema\SchemaConfig::hasExplicitForeignKeyIndexes"/>
<!--
TODO: remove in 4.0.0
See https://github.com/doctrine/dbal/pull/4814
-->
<referencedMethod name="Doctrine\DBAL\Schema\AbstractAsset::getFullQualifiedName"/>
<!--
TODO: remove in 4.0.0
See https://github.com/doctrine/dbal/pull/4821
-->
<referencedMethod name="Doctrine\DBAL\Schema\AbstractSchemaManager::getSchemaSearchPaths"/>
<!--
TODO: remove in 4.0.0
-->
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getCreateConstraintSQL"/>
<referencedMethod name="Doctrine\DBAL\Schema\ForeignKeyConstraint::getColumns"/>
<!--
TODO: remove in 4.0.0
See https://github.com/doctrine/dbal/pull/4897
-->
<referencedMethod name="Doctrine\DBAL\Schema\AbstractSchemaManager::tryMethod"/>
<!-- TODO: remove in 4.0.0 -->
<referencedMethod name="Doctrine\DBAL\Driver\PDO\Connection::getWrappedConnection"/>
<!--
TODO: remove in 4.0.0
See https://github.com/doctrine/dbal/pull/4966
-->
<referencedMethod name="Doctrine\DBAL\Connection::getWrappedConnection"/>
<!--
TODO: remove in 4.0.0
See https://github.com/doctrine/dbal/pull/1519
-->
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractMySQLPlatform::prefersIdentityColumns"/>
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::prefersIdentityColumns"/>
<referencedMethod name="Doctrine\DBAL\Platforms\DB2Platform::prefersIdentityColumns"/>
<referencedMethod name="Doctrine\DBAL\Platforms\SQLServerPlatform::prefersIdentityColumns"/>
<referencedMethod name="Doctrine\DBAL\Platforms\SqlitePlatform::prefersIdentityColumns"/>
<!--
TODO: remove in 4.0.0
See https://github.com/doctrine/dbal/pull/5136
-->
<referencedMethod name="Doctrine\DBAL\Types\Type::canRequireSQLConversion"/>
</errorLevel>
</DeprecatedMethod>
<DeprecatedProperty>
<errorLevel type="suppress">
<!--
This suppression should be removed in 4.0.x
See https://github.com/doctrine/dbal/pull/4518
-->
<file name="src/Connection.php"/>
<!--
This suppression should be removed in 4.0.x
See https://github.com/doctrine/dbal/pull/4620
-->
<file name="src/Configuration.php"/>
<!--
This suppression should be removed in 4.0.x
See https://github.com/doctrine/dbal/pull/4822
-->
<referencedProperty name="Doctrine\DBAL\Schema\SchemaConfig::$hasExplicitForeignKeyIndexes"/>
<!--
See https://github.com/doctrine/dbal/pull/5058
TODO: remove in 4.0.0
-->
<referencedProperty name="Doctrine\DBAL\Platforms\AbstractPlatform::$doctrineTypeComments"/>
</errorLevel>
</DeprecatedProperty>
<DocblockTypeContradiction>
<errorLevel type="suppress">
<!--
Requires a release of https://github.com/JetBrains/phpstorm-stubs/pull/766
-->
<file name="src/Driver/Mysqli/Result.php"/>
<!--
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="src/Cache/QueryCacheProfile.php"/>
<file name="src/Connection.php"/>
<file name="src/Driver/IBMDB2/Statement.php"/>
<file name="src/DriverManager.php"/>
<file name="src/Platforms/AbstractMySQLPlatform.php"/>
<file name="src/Platforms/AbstractPlatform.php"/>
<file name="src/Platforms/SQLServerPlatform.php"/>
<file name="src/Platforms/SqlitePlatform.php"/>
<file name="src/Schema/Column.php"/>
<!--
This issue is fixed in 4.0
-->
<file name="src/Schema/Index.php"/>
<!--
See https://github.com/vimeo/psalm/issues/5325
-->
<file name="tests/Driver/OCI8/ExecutionModeTest.php"/>
<!-- See https://github.com/vimeo/psalm/issues/5472 -->
<file name="src/Portability/Converter.php"/>
<!-- See https://github.com/psalm/psalm-plugin-phpunit/issues/107 -->
<file name="tests/Functional/Schema/SchemaManagerFunctionalTestCase.php"/>
</errorLevel>
</DocblockTypeContradiction>
<FalsableReturnStatement>
<errorLevel type="suppress">
<!--
Fixing these issues requires an API change
-->
<file name="src/Driver/PDO/SQLSrv/Connection.php"/>
<file name="src/Driver/SQLSrv/Connection.php"/>
</errorLevel>
</FalsableReturnStatement>
<ImplementedReturnTypeMismatch>
<errorLevel type="suppress">
<!-- Fixing this issue requires an API change -->
<file name="src/Driver/OCI8/Connection.php"/>
</errorLevel>
</ImplementedReturnTypeMismatch>
<InvalidArgument>
<errorLevel type="suppress">
<!-- We're testing with invalid input here. -->
<file name="tests/Platforms/AbstractPlatformTestCase.php"/>
</errorLevel>
</InvalidArgument>
<InvalidDocblock>
<errorLevel type="suppress">
<!-- See https://github.com/vimeo/psalm/issues/5472 -->
<file name="src/Portability/Converter.php"/>
</errorLevel>
</InvalidDocblock>
<InvalidNullableReturnType>
<errorLevel type="suppress">
<!-- See https://github.com/doctrine/dbal/issues/4503 -->
<file name="src/Schema/PostgreSQLSchemaManager.php"/>
</errorLevel>
</InvalidNullableReturnType>
<InvalidPropertyAssignmentValue>
<errorLevel type="suppress">
<!-- Fixing this issue requires an API change -->
<file name="src/Driver/PDO/Exception.php"/>
</errorLevel>
</InvalidPropertyAssignmentValue>
<MissingConstructor>
<errorLevel type="suppress">
<!--
This suppression should be removed in 4.0.x
See https://github.com/doctrine/dbal/pull/3712
-->
<file name="src/Schema/SchemaConfig.php"/>
</errorLevel>
</MissingConstructor>
<NullableReturnStatement>
<errorLevel type="suppress">
<!--
Fixing this issue requires an API change
-->
<file name="src/Driver/AbstractSQLiteDriver.php"/>
<!-- See https://github.com/doctrine/dbal/issues/4503 -->
<file name="src/Schema/PostgreSQLSchemaManager.php"/>
</errorLevel>
</NullableReturnStatement>
<PossiblyNullArgument>
<errorLevel type="suppress">
<!-- See https://github.com/doctrine/dbal/pull/3488 -->
<file name="src/Schema/AbstractSchemaManager.php"/>
</errorLevel>
</PossiblyNullArgument>
<PossiblyUndefinedArrayOffset>
<errorLevel type="suppress">
<!-- See https://github.com/psalm/psalm-plugin-phpunit/pull/82 -->
<file name="tests/Functional/PrimaryReadReplicaConnectionTest.php"/>
<file name="tests/Functional/Schema/PostgreSQLSchemaManagerTest.php"/>
</errorLevel>
</PossiblyUndefinedArrayOffset>
<PossiblyNullIterator>
<errorLevel type="suppress">
<!--
This suppression should be removed in 4.0.x
See https://github.com/doctrine/dbal/pull/3712
-->
<file name="src/Driver/Mysqli/Statement.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="src/Driver/OCI8/Statement.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="src/Schema/ForeignKeyConstraint.php"/>
<!--
This suppression should be removed in 4.0.x
See https://github.com/doctrine/dbal/pull/3712
-->
<file name="src/Schema/Column.php"/>
<file name="src/Schema/Identifier.php"/>
<file name="src/Schema/Index.php"/>
<file name="src/Schema/Schema.php"/>
<file name="src/Schema/Sequence.php"/>
<file name="src/Schema/Table.php"/>
<file name="src/Schema/UniqueConstraint.php"/>
<file name="src/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="src"/>
</errorLevel>
</RedundantCastGivenDocblockType>
<RedundantConditionGivenDocblockType>
<errorLevel type="suppress">
<!--
Fixing these issues requires support of union types at the language level
or breaking API changes.
-->
<file name="src/Platforms/AbstractMySQLPlatform.php"/>
<file name="tests/Functional/Driver/AbstractDriverTest.php"/>
</errorLevel>
</RedundantConditionGivenDocblockType>
<ReferenceConstraintViolation>
<errorLevel type="suppress">
<!--
This suppression should be removed in 4.0.x
See https://github.com/doctrine/dbal/pull/3836
-->
<file name="src/Query/QueryBuilder.php"/>
</errorLevel>
</ReferenceConstraintViolation>
<!-- Workaround for https://github.com/vimeo/psalm/issues/7026 -->
<ReservedWord>
<errorLevel type="suppress">
<directory name="src"/>
<directory name="tests"/>
</errorLevel>
</ReservedWord>
<TooManyArguments>
<errorLevel type="suppress">
<!-- See https://github.com/doctrine/dbal/pull/3562 -->
<file name="src/Schema/AbstractSchemaManager.php"/>
<file name="src/Schema/SqliteSchemaManager.php"/>
<!-- See https://github.com/doctrine/dbal/pull/3498 -->
<file name="tests/Platforms/AbstractMySQLPlatformTestCase.php"/>
</errorLevel>
</TooManyArguments>
<UndefinedConstant>
<errorLevel type="suppress">
<!--
Requires a release of
https://github.com/JetBrains/phpstorm-stubs/pull/732
-->
<file name="tests/Driver/PDO/PgSQL/DriverTest.php" />
</errorLevel>
</UndefinedConstant>
<UndefinedDocblockClass>
<errorLevel type="suppress">
<!-- See https://github.com/vimeo/psalm/issues/5472 -->
<referencedClass name="Doctrine\DBAL\Portability\T"/>
</errorLevel>
</UndefinedDocblockClass>
<InvalidReturnStatement>
<errorLevel type="suppress">
<!-- lastInsertId has a return type that does not match the one defined in the interface-->
<file name="src/Driver/Mysqli/Connection.php"/>
<!--
This issue should be fixed in 4.0
-->
<file name="src/Connection.php"/>
<file name="src/Statement.php"/>
<file name="src/Query/QueryBuilder.php"/>
</errorLevel>
</InvalidReturnStatement>
<InvalidReturnType>
<errorLevel type="suppress">
<!-- lastInsertId has a return type that does not match the one defined in the interface-->
<file name="src/Driver/Mysqli/Connection.php"/>
<!--
This issue should be fixed in 4.0
-->
<file name="src/Connection.php"/>
<file name="src/Statement.php"/>
<file name="src/Query/QueryBuilder.php"/>
</errorLevel>
</InvalidReturnType>
<InvalidScalarArgument>
<errorLevel type="suppress">
<!-- See https://github.com/vimeo/psalm/issues/4295 -->
<file name="src/Exception/DriverException.php"/>
<!-- See https://github.com/doctrine/dbal/pull/3498 -->
<file name="tests/Functional/DataAccessTest.php"/>
<file name="tests/Platforms/AbstractPlatformTestCase.php"/>
<file name="tests/Platforms/DB2PlatformTest.php"/>
<file name="tests/Platforms/OraclePlatformTest.php"/>
<file name="tests/Platforms/SqlitePlatformTest.php"/>
<!-- See https://github.com/doctrine/dbal/pull/3574 -->
<file name="tests/Query/Expression/ExpressionBuilderTest.php"/>
<!-- See https://bugs.php.net/bug.php?id=77591 -->
<referencedFunction name="db2_autocommit"/>
</errorLevel>
</InvalidScalarArgument>
</issueHandlers>
</psalm>