Skip to content

Commit 8725a81

Browse files
authored
Cleanup obsolete PHPStan ignore rules (doctrine#6697)
1 parent 8f0c37f commit 8725a81

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

phpstan.neon.dist

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ parameters:
6767
message: '~^Parameter #1 \$params of method Doctrine\\DBAL\\Driver\:\:connect\(\) expects array~'
6868
path: tests/Driver/PDO/*/DriverTest.php
6969

70-
# DriverManagerTest::testDatabaseUrl() should be refactored as it's too dynamic.
71-
-
72-
message: '~^Offset string does not exist on array{.+}\.$~'
73-
paths:
74-
- tests/DriverManagerTest.php
75-
7670
# There is no way to make this assertion in the code,
7771
# and the API doesn't support parametrization of returned column types.
7872
-
@@ -87,31 +81,9 @@ parameters:
8781
- '~^Parameter #1 \$row of method Doctrine\\DBAL\\Driver\\PgSQL\\Result\:\:mapAssociativeRow\(\) expects array<string, string\|null>, array<int\|string, string\|null> given\.$~'
8882
- '~^Parameter #1 \$row of method Doctrine\\DBAL\\Driver\\PgSQL\\Result\:\:mapNumericRow\(\) expects list<string\|null>, .* given\.$~'
8983

90-
# https://github.com/phpstan/phpstan-src/pull/2224
91-
-
92-
message: '~^Method Doctrine\\DBAL\\Driver\\Mysqli\\Connection\:\:exec\(\) should return int\|numeric\-string but returns int\|string\.$~'
93-
count: 1
94-
path: src/Driver/Mysqli/Connection.php
95-
96-
# https://github.com/phpstan/phpstan/issues/9429
97-
-
98-
message: '~^Strict comparison using === between int<0, max> and false will always evaluate to false.$~'
99-
paths:
100-
- src/Driver/IBMDB2/Connection.php
101-
- src/Driver/IBMDB2/Result.php
102-
103-
# Ignore the possible false return value of db2_num_rows().
104-
- '~^Method Doctrine\\DBAL\\Driver\\IBMDB2\\Connection\:\:exec\(\) should return int but returns int<0, max>\|false\.$~'
105-
- '~^Method Doctrine\\DBAL\\Driver\\IBMDB2\\Result\:\:rowCount\(\) should return int but returns int<0, max>\|false\.$~'
106-
10784
# Required for Psalm compatibility
10885
- '~^Property Doctrine\\DBAL\\Tests\\Types\\BaseDateTypeTestCase\:\:\$currentTimezone \(non-empty-string\) does not accept string\.$~'
10986

110-
# This is a rather complicated closure setup. We understand this, so PHPStan doesn't have to.
111-
-
112-
message: '#^Parameter \#2 \$callback of function array_reduce expects callable\(\(callable&TIn\)\|Closure\(mixed \$value\)\: mixed\|null, callable\(T\)\: T\)\: \(\(callable&TIn\)\|Closure\(mixed \$value\)\: mixed\|null\), Closure\(callable\|null, callable\)\: \(callable\(T\)\: T\) given\.$#'
113-
path: src/Portability/Converter.php
114-
11587
# The @throws annotations are part of a contract. Even if the default implementation doen't throw those
11688
# exceptions, the child implementations might do so.
11789
-
@@ -125,10 +97,6 @@ parameters:
12597
# TODO: remove in 5.0.0
12698
- '~^Call to function method_exists\(\) with Doctrine\\DBAL\\Driver\\Result and ''getColumnName'' will always evaluate to true\.$~'
12799

128-
# PHPStan does not know the new PDO classes yet.
129-
- '~^Class Pdo\\\w+ not found\.$~'
130-
- '~^Call to an undefined static method PDO\:\:connect\(\)\.$~'
131-
132100
# TODO: Review these errors and fix them.
133101
- identifier: phpunit.assertEquals
134102
includes:

0 commit comments

Comments
 (0)