-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathphpstan.neon.dist
127 lines (106 loc) · 6.72 KB
/
phpstan.neon.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
parameters:
level: 8
paths:
- lib
reportUnmatchedIgnoredErrors: false
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
earlyTerminatingMethodCalls:
Doctrine\DBAL\Connection:
- handleDriverException
- handleExceptionDuringQuery
ignoreErrors:
# extension not available
- '~^(Used )?(Function|Constant) sasql_\S+ not found\.\z~i'
# removing it would be BC break
- '~^Constructor of class Doctrine\\DBAL\\Schema\\Table has an unused parameter \$idGeneratorType\.\z~'
# https://github.com/doctrine/dbal/pull/3836
- '~^Parameter #2 \$registeredAliases of static method Doctrine\\DBAL\\Query\\QueryException::nonUniqueAlias\(\) expects array<string>, array<int, int\|string> given\.\z~'
# legacy variadic-like signature
# TODO: remove in 3.0.0
- '~^Method Doctrine\\DBAL(\\.*)?Connection::query\(\) invoked with \d+ parameters?, 0 required\.\z~'
# some drivers actually do accept 2nd parameter...
- '~^Method Doctrine\\DBAL\\Platforms\\AbstractPlatform::getListTableForeignKeysSQL\(\) invoked with \d+ parameters, 1 required\.\z~'
# legacy remnants from doctrine/common
- '~^Class Doctrine\\Common\\(Collections\\Collection|Persistence\\Proxy) not found\.\z~'
- '~^.+ on an unknown class Doctrine\\Common\\(Collections\\Collection|Persistence\\Proxy)\.\z~'
# This is deprecated code. Fixing the issue may cause a BC break.
# TODO: remove in 3.0.0
-
message: '~^Return type \(Doctrine\\DBAL\\Platforms\\DrizzlePlatform\) of method Doctrine\\DBAL\\Driver\\DrizzlePDOMySql\\Driver::getDatabasePlatform\(\) should be compatible with return type \(Doctrine\\DBAL\\Platforms\\MySqlPlatform\) of method Doctrine\\DBAL\\Driver\\AbstractMySQLDriver::getDatabasePlatform\(\)$~'
paths:
- lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Driver.php
# This is deprecated code. Fixing the issue may cause a BC break.
# TODO: remove in 3.0.0
-
message: '~^Return type \(Doctrine\\DBAL\\Schema\\DrizzleSchemaManager\) of method Doctrine\\DBAL\\Driver\\DrizzlePDOMySql\\Driver::getSchemaManager\(\) should be compatible with return type \(Doctrine\\DBAL\\Schema\\MySqlSchemaManager\) of method Doctrine\\DBAL\\Driver\\AbstractMySQLDriver::getSchemaManager\(\)$~'
paths:
- lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Driver.php
# This is deprecated code. Fixing the issue may cause a BC break.
# TODO: remove in 3.0.0
-
message: '~^Return type \(int\) of method Doctrine\\DBAL\\Driver\\Mysqli\\MysqliConnection::errorCode\(\) should be compatible with return type \(string\|null\) of method Doctrine\\DBAL\\Driver\\Connection::errorCode\(\)$~'
paths:
- lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
# This is deprecated code. Fixing the issue may cause a BC break.
# TODO: remove in 3.0.0
-
message: '~^Return type \(string\) of method Doctrine\\DBAL\\Driver\\Mysqli\\MysqliConnection::errorInfo\(\) should be compatible with return type \(array\) of method Doctrine\\DBAL\\Driver\\Connection::errorInfo\(\)$~'
paths:
- lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
# This is deprecated code. Fixing the issue may cause a BC break.
# TODO: remove in 3.0.0
-
message: '~^Return type \(string\) of method Doctrine\\DBAL\\Driver\\Mysqli\\MysqliStatement::errorInfo\(\) should be compatible with return type \(array\) of method Doctrine\\DBAL\\Driver\\Statement::errorInfo\(\)$~'
paths:
- lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
-
message: '~Method Doctrine\\DBAL\\Driver\\PDOSqlsrv\\Connection\:\:lastInsertId\(\) should return int\|string\|false but returns int\|string\|false\|null\.~'
paths:
- lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php
-
message: '~Return type \(Doctrine\\DBAL\\Portability\\Statement\) of method Doctrine\\DBAL\\Portability\\Connection::prepare\(\) should be compatible with return type \(Doctrine\\DBAL\\Statement\) of method Doctrine\\DBAL\\Connection::prepare\(\)~'
paths:
- lib/Doctrine/DBAL/Portability/Connection.php
# Until 3.x, $_conn does accept PDO
-
message: '~^Property Doctrine\\DBAL\\Connection::\$_conn \(Doctrine\\DBAL\\Driver\\Connection\|null\) does not accept PDO\.$~'
paths:
- lib/Doctrine/DBAL/Connection.php
-
message: '~Template type T of method Doctrine\\DBAL\\DriverManager::getConnection\(\) is not referenced in a parameter\.~'
paths:
- lib/Doctrine/DBAL/DriverManager.php
-
message: '~Method Doctrine\\DBAL\\DriverManager::createDriver\(\) should return Doctrine\\DBAL\\Driver but returns object\.~'
paths:
- lib/Doctrine/DBAL/DriverManager.php
# TODO: remove in 4.0.0
-
message: '~^Parameter #2 \$table of class Doctrine\\DBAL\\Event\\SchemaIndexDefinitionEventArgs constructor expects string, string\|null given\.$~'
paths:
- lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php
# https://github.com/phpstan/phpstan/issues/1901
-
message: '~^Method Doctrine\\DBAL\\Platforms\\AbstractPlatform::escapeStringForLike\(\) should return string but returns string\|null\.$~'
paths:
- lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
# https://github.com/phpstan/phpstan/issues/4679
-
message: '~^Cannot call method writeTemporary\(\) on OCILob\|null\.$~'
paths:
- lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
# This is a new requirement for PHP7's oci8 extension that prevents bound values from being garbage collected.
-
message: '~^Property Doctrine\\DBAL\\Driver\\OCI8\\OCI8Statement\:\:\$boundValues is never read, only written\.$~'
paths:
- lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
-
message: '~Method Doctrine\\DBAL\\Driver\\Mysqli\\MysqliStatement::rowCount\(\) should return int but returns int\|string\.~'
paths:
- lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
# TODO: This class is deprecaed, remove this rule on 3.x
-
message: '~^Parameter #2 \$code of class RuntimeException constructor expects int, string given\.$~'
paths:
- lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php