Skip to content

Commit 1a2fbd0

Browse files
committed
Merge branch '3.10.x' into 4.3.x
* 3.10.x: phpunit/phpunit (9.6.23 => 9.6.29) (doctrine#7188) phpstan/phpstan (2.1.22 => 2.1.30) (doctrine#7187)
2 parents a047645 + 65edaca commit 1a2fbd0

File tree

4 files changed

+20
-23
lines changed

4 files changed

+20
-23
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
"doctrine/coding-standard": "14.0.0",
4141
"fig/log-test": "^1",
4242
"jetbrains/phpstorm-stubs": "2023.2",
43-
"phpstan/phpstan": "2.1.22",
44-
"phpstan/phpstan-phpunit": "2.0.6",
43+
"phpstan/phpstan": "2.1.30",
44+
"phpstan/phpstan-phpunit": "2.0.7",
4545
"phpstan/phpstan-strict-rules": "^2",
4646
"phpunit/phpunit": "11.5.23",
4747
"slevomat/coding-standard": "8.24.0",

phpstan-baseline.neon

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,85 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: '#^Method Doctrine\\DBAL\\Driver\\IBMDB2\\Connection\:\:exec\(\) never returns numeric\-string so it can be removed from the return type\.$#'
4+
rawMessage: 'Method Doctrine\DBAL\Driver\IBMDB2\Connection::exec() never returns numeric-string so it can be removed from the return type.'
55
identifier: return.unusedType
66
count: 1
77
path: src/Driver/IBMDB2/Connection.php
88

99
-
10-
message: '#^Method Doctrine\\DBAL\\Driver\\OCI8\\Connection\:\:exec\(\) never returns numeric\-string so it can be removed from the return type\.$#'
10+
rawMessage: 'Method Doctrine\DBAL\Driver\OCI8\Connection::exec() never returns numeric-string so it can be removed from the return type.'
1111
identifier: return.unusedType
1212
count: 1
1313
path: src/Driver/OCI8/Connection.php
1414

1515
-
16-
message: '#^Method Doctrine\\DBAL\\Driver\\OCI8\\Result\:\:fetchAllAssociative\(\) should return list\<array\<string, mixed\>\> but returns array\<mixed\>\.$#'
16+
rawMessage: 'Method Doctrine\DBAL\Driver\OCI8\Result::fetchAllAssociative() should return list<array<string, mixed>> but returns array<mixed>.'
1717
identifier: return.type
1818
count: 1
1919
path: src/Driver/OCI8/Result.php
2020

2121
-
22-
message: '#^Method Doctrine\\DBAL\\Driver\\OCI8\\Result\:\:fetchAllNumeric\(\) should return list\<list\<mixed\>\> but returns array\<mixed\>\.$#'
22+
rawMessage: 'Method Doctrine\DBAL\Driver\OCI8\Result::fetchAllNumeric() should return list<list<mixed>> but returns array<mixed>.'
2323
identifier: return.type
2424
count: 1
2525
path: src/Driver/OCI8/Result.php
2626

2727
-
28-
message: '#^Method Doctrine\\DBAL\\Driver\\PDO\\Result\:\:fetchAll\(\) should return list\<mixed\> but returns array\.$#'
28+
rawMessage: 'Method Doctrine\DBAL\Driver\PDO\Result::fetchAll() should return list<mixed> but returns array.'
2929
identifier: return.type
3030
count: 1
3131
path: src/Driver/PDO/Result.php
3232

3333
-
34-
message: '#^Method Doctrine\\DBAL\\Driver\\PgSQL\\Result\:\:fetchAllAssociative\(\) should return list\<array\<string, mixed\>\> but returns array\<int, array\<string, mixed\>\>\.$#'
34+
rawMessage: 'Method Doctrine\DBAL\Driver\PgSQL\Result::fetchAllAssociative() should return list<array<string, mixed>> but returns array<int, array<string, mixed>>.'
3535
identifier: return.type
3636
count: 1
3737
path: src/Driver/PgSQL/Result.php
3838

3939
-
40-
message: '#^Method Doctrine\\DBAL\\Driver\\PgSQL\\Result\:\:fetchAllNumeric\(\) should return list\<list\<mixed\>\> but returns array\<int, list\<mixed\>\>\.$#'
40+
rawMessage: 'Method Doctrine\DBAL\Driver\PgSQL\Result::fetchAllNumeric() should return list<list<mixed>> but returns array<int, list<mixed>>.'
4141
identifier: return.type
4242
count: 1
4343
path: src/Driver/PgSQL/Result.php
4444

4545
-
46-
message: '#^Method Doctrine\\DBAL\\Driver\\PgSQL\\Result\:\:fetchFirstColumn\(\) should return list\<mixed\> but returns array\<int, bool\|float\|int\|string\|null\>\.$#'
46+
rawMessage: 'Method Doctrine\DBAL\Driver\PgSQL\Result::fetchFirstColumn() should return list<mixed> but returns array<int, bool|float|int|string|null>.'
4747
identifier: return.type
4848
count: 1
4949
path: src/Driver/PgSQL/Result.php
5050

5151
-
52-
message: '#^Method Doctrine\\DBAL\\Driver\\SQLite3\\Result\:\:fetchNumeric\(\) should return list\<mixed\>\|false but returns array\|false\.$#'
52+
rawMessage: 'Method Doctrine\DBAL\Driver\SQLite3\Result::fetchNumeric() should return list<mixed>|false but returns array|false.'
5353
identifier: return.type
5454
count: 1
5555
path: src/Driver/SQLite3/Result.php
5656

5757
-
58-
message: '#^Template type T is declared as covariant, but occurs in invariant position in property Doctrine\\DBAL\\Schema\\AbstractSchemaManager\:\:\$platform\.$#'
58+
rawMessage: 'Template type T is declared as covariant, but occurs in invariant position in property Doctrine\DBAL\Schema\AbstractSchemaManager::$platform.'
5959
identifier: generics.variance
6060
count: 1
6161
path: src/Schema/AbstractSchemaManager.php
6262

6363
-
64-
message: '#^Loose comparison via "\!\=" is not allowed\.$#'
64+
rawMessage: 'Loose comparison via "!=" is not allowed.'
6565
identifier: notEqual.notAllowed
6666
count: 1
6767
path: src/Schema/ColumnDiff.php
6868

6969
-
70-
message: '#^Method Doctrine\\DBAL\\Schema\\SQLiteSchemaManager\:\:addDetailsToTableForeignKeyColumns\(\) should return list\<array\<string, mixed\>\> but returns array\<int\<0, max\>, array\<string, mixed\>\>\.$#'
71-
identifier: return.type
72-
count: 1
73-
path: src/Schema/SQLiteSchemaManager.php
74-
75-
-
76-
message: '#^Offset string might not exist on array\{application_name\?\: string, charset\?\: string, dbname\?\: string, defaultTableOptions\?\: array\<string, mixed\>, driver\?\: ''ibm_db2''\|''mysqli''\|''oci8''\|''pdo_mysql''\|''pdo_oci''\|''pdo_pgsql''\|''pdo_sqlite''\|''pdo_sqlsrv''\|''pgsql''\|''sqlite3''\|''sqlsrv'', driverClass\?\: class\-string\<Doctrine\\DBAL\\Driver\>, driverOptions\?\: array\<mixed\>, host\?\: string, \.\.\.\}\.$#'
70+
rawMessage: 'Offset string might not exist on array{application_name?: string, charset?: string, dbname?: string, defaultTableOptions?: array<string, mixed>, driver?: ''ibm_db2''|''mysqli''|''oci8''|''pdo_mysql''|''pdo_oci''|''pdo_pgsql''|''pdo_sqlite''|''pdo_sqlsrv''|''pgsql''|''sqlite3''|''sqlsrv'', driverClass?: class-string<Doctrine\DBAL\Driver>, driverOptions?: array<mixed>, host?: string, ...}.'
7771
identifier: offsetAccess.notFound
7872
count: 1
7973
path: tests/DriverManagerTest.php
8074

8175
-
82-
message: '#^Call to new Doctrine\\DBAL\\Driver\\PgSQL\\Result\(\) on a separate line has no effect\.$#'
76+
rawMessage: 'Call to new Doctrine\DBAL\Driver\PgSQL\Result() on a separate line has no effect.'
8377
identifier: new.resultUnused
8478
count: 1
8579
path: tests/Functional/Driver/PgSQL/ResultTest.php
8680

8781
-
88-
message: '#^Call to function array_filter\(\) requires parameter \#2 to be passed to avoid loose comparison semantics\.$#'
82+
rawMessage: 'Call to function array_filter() requires parameter #2 to be passed to avoid loose comparison semantics.'
8983
identifier: arrayFilter.strict
9084
count: 1
9185
path: tests/Functional/Schema/MySQL/JsonCollationTest.php

phpstan.neon.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ parameters:
77
- tests
88
treatPhpDocTypesAsCertain: false
99
reportUnmatchedIgnoredErrors: false
10+
checkStrictPrintfPlaceholderTypes: false
1011
exceptions:
1112
check:
1213
missingCheckedExceptionInThrows: true
1314
uncheckedExceptionClasses:
1415
- ErrorException
1516
- LogicException
1617
- RuntimeException
18+
- ValueError
1719
ignoreErrors:
1820
- identifier: missingType.generics
1921

src/Driver/IBMDB2/Statement.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ private function bindLobs(): array
110110
foreach ($this->lobs as $param => $value) {
111111
if (is_resource($value)) {
112112
$handle = $handles[] = $this->createTemporaryFile();
113-
$path = stream_get_meta_data($handle)['uri'];
113+
$path = stream_get_meta_data($handle)['uri'] ?? null;
114+
assert($path !== null);
114115

115116
$this->copyStreamToStream($value, $handle);
116117

0 commit comments

Comments
 (0)