Upgrading phpstan/phpstan (2.1.38 => 2.1.41)

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
Kamil Tekiela 2026-03-16 20:09:08 +00:00
parent 4acd79bd83
commit f4df04fcc3
2 changed files with 176 additions and 32 deletions

10
composer.lock generated
View File

@ -5420,11 +5420,11 @@
},
{
"name": "phpstan/phpstan",
"version": "2.1.38",
"version": "2.1.41",
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/dfaf1f530e1663aa167bc3e52197adb221582629",
"reference": "dfaf1f530e1663aa167bc3e52197adb221582629",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/a2eae8f20856b3afe74bf1f9726ce8c11438e300",
"reference": "a2eae8f20856b3afe74bf1f9726ce8c11438e300",
"shasum": ""
},
"require": {
@ -5469,7 +5469,7 @@
"type": "github"
}
],
"time": "2026-01-30T17:12:46+00:00"
"time": "2026-03-16T18:24:10+00:00"
},
{
"name": "phpstan/phpstan-deprecation-rules",
@ -8910,5 +8910,5 @@
"platform-overrides": {
"php": "8.2.99"
},
"plugin-api-version": "2.6.0"
"plugin-api-version": "2.9.0"
}

View File

@ -471,6 +471,12 @@ parameters:
count: 1
path: src/Config/Form.php
-
message: '#^Parameter \#1 \$keys of function array_combine expects an array of values castable to string, list\<mixed\> given\.$#'
identifier: argument.type
count: 1
path: src/Config/Form.php
-
message: '#^Parameter \#1 \$keys of function array_combine expects array\<int\|string\>, list\<mixed\> given\.$#'
identifier: argument.type
@ -835,7 +841,7 @@ parameters:
path: src/Config/Settings/Server.php
-
message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(mixed\)\: mixed\)\|null, Closure\(bool\|float\|int\|resource\|string\|null\)\: string given\.$#'
message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(mixed\)\: mixed\)\|null, Closure\(bool\|float\|GMP\|int\|resource\|string\|null\)\: string given\.$#'
identifier: argument.type
count: 1
path: src/Config/Settings/Server.php
@ -1209,12 +1215,6 @@ parameters:
count: 21
path: src/ConfigStorage/Relation.php
-
message: '#^Do\-while loop condition is always false\.$#'
identifier: doWhile.alwaysFalse
count: 1
path: src/ConfigStorage/Relation.php
-
message: '#^Method PhpMyAdmin\\ConfigStorage\\Relation\:\:getChildReferences\(\) should return array\<list\<array\<mixed\>\>\> but returns array\<mixed\>\.$#'
identifier: return.type
@ -1323,6 +1323,12 @@ parameters:
count: 1
path: src/ConfigStorage/Relation.php
-
message: '#^Only booleans are allowed in &&, mixed given on the right side\.$#'
identifier: booleanAnd.rightNotBoolean
count: 18
path: src/ConfigStorage/RelationParameters.php
-
message: '''
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
@ -2271,6 +2277,12 @@ parameters:
count: 1
path: src/Controllers/Server/DatabasesController.php
-
message: '#^Only booleans are allowed in an if condition, mixed given\.$#'
identifier: if.condNotBoolean
count: 1
path: src/Controllers/Server/DatabasesController.php
-
message: '#^Parameter \#1 \$params of static method PhpMyAdmin\\Url\:\:getCommonRaw\(\) expects array\<int\|string, bool\|int\|string\>, array\<string, mixed\> given\.$#'
identifier: argument.type
@ -3387,6 +3399,12 @@ parameters:
count: 2
path: src/Controllers/Table/Structure/SaveController.php
-
message: '#^Only booleans are allowed in an if condition, mixed given\.$#'
identifier: if.condNotBoolean
count: 1
path: src/Controllers/Table/Structure/SaveController.php
-
message: '#^Parameter \#1 \$identifier of static method PhpMyAdmin\\Util\:\:backquote\(\) expects string\|Stringable\|null, mixed given\.$#'
identifier: argument.type
@ -4086,6 +4104,24 @@ parameters:
count: 1
path: src/CreateAddField.php
-
message: '#^Only booleans are allowed in &&, mixed given on the right side\.$#'
identifier: booleanAnd.rightNotBoolean
count: 1
path: src/CreateAddField.php
-
message: '#^Only booleans are allowed in a negated boolean, mixed given\.$#'
identifier: booleanNot.exprNotBoolean
count: 1
path: src/CreateAddField.php
-
message: '#^Only booleans are allowed in an if condition, mixed given\.$#'
identifier: if.condNotBoolean
count: 2
path: src/CreateAddField.php
-
message: '#^Parameter \#1 \$collation of static method PhpMyAdmin\\Util\:\:getCharsetQueryPart\(\) expects string, mixed given\.$#'
identifier: argument.type
@ -4686,6 +4722,12 @@ parameters:
count: 1
path: src/Database/Routines.php
-
message: '#^Parameter \#2 \$array of function implode expects array\<string\>, array\<mixed, mixed\> given\.$#'
identifier: argument.type
count: 1
path: src/Database/Routines.php
-
message: '#^Parameter \#2 \$itemParamDir of method PhpMyAdmin\\Database\\Routines\:\:processParamsAndBuild\(\) expects array\<string\>, array\<mixed, mixed\> given\.$#'
identifier: argument.type
@ -4734,6 +4776,12 @@ parameters:
count: 1
path: src/Database/Routines.php
-
message: '#^Parameter \#1 \$array of function array_intersect expects an array of values castable to string, array\<mixed, mixed\> given\.$#'
identifier: argument.type
count: 1
path: src/Database/Search.php
-
message: '#^Property PhpMyAdmin\\Database\\Search\:\:\$criteriaTables \(array\<string\>\) does not accept array\<mixed\>\.$#'
identifier: assign.propertyType
@ -4782,18 +4830,6 @@ parameters:
count: 1
path: src/Dbal/DatabaseInterface.php
-
message: '#^Cannot access an offset on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: src/Dbal/DatabaseInterface.php
-
message: '#^Cannot access offset string\|null on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 2
path: src/Dbal/DatabaseInterface.php
-
message: '#^Cannot cast mixed to string\.$#'
identifier: cast.string
@ -4842,6 +4878,12 @@ parameters:
count: 1
path: src/Dbal/DatabaseInterface.php
-
message: '#^Offset string\|null on array\{\} in isset\(\) does not exist\.$#'
identifier: isset.offset
count: 1
path: src/Dbal/DatabaseInterface.php
-
message: '#^Only booleans are allowed in &&, int\|false given on the left side\.$#'
identifier: booleanAnd.leftNotBoolean
@ -4908,6 +4950,12 @@ parameters:
count: 1
path: src/Dbal/DatabaseInterface.php
-
message: '#^Parameter \#2 \$arrays of function array_diff expects an array of values castable to string, array given\.$#'
identifier: argument.type
count: 1
path: src/Dbal/DatabaseInterface.php
-
message: '#^Parameter \#2 \$callback of function usort contains unresolvable type\.$#'
identifier: argument.unresolvableType
@ -5088,7 +5136,7 @@ parameters:
-
message: '#^Cannot access offset ''max_rows'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 19
count: 14
path: src/Display/Results.php
-
@ -5772,6 +5820,12 @@ parameters:
count: 1
path: src/Export/Export.php
-
message: '#^Parameter \#2 \$array of function implode expects array\<string\>, array\<mixed\> given\.$#'
identifier: argument.type
count: 1
path: src/Export/Export.php
-
message: '#^Parameter \#2 \$dbAlias of method PhpMyAdmin\\Plugins\\ExportPlugin\:\:exportDBCreate\(\) expects string, mixed given\.$#'
identifier: argument.type
@ -6471,6 +6525,18 @@ parameters:
count: 1
path: src/Gis/GisMultiPolygon.php
-
message: '#^Only booleans are allowed in a negated boolean, mixed given\.$#'
identifier: booleanNot.exprNotBoolean
count: 2
path: src/Gis/GisMultiPolygon.php
-
message: '#^Only booleans are allowed in an if condition, mixed given\.$#'
identifier: if.condNotBoolean
count: 1
path: src/Gis/GisMultiPolygon.php
-
message: '#^Parameter \#1 \$point of method PhpMyAdmin\\Gis\\GisGeometry\:\:getWktCoord\(\) expects array\{x\: float\|int\|string, y\: float\|int\|string\}\|null, mixed given\.$#'
identifier: argument.type
@ -6747,6 +6813,24 @@ parameters:
count: 1
path: src/Git.php
-
message: '#^Offset 1 might not exist on array\{\}\|array\{0\: non\-falsy\-string, 1\: non\-empty\-string, 2\: non\-empty\-string, 3\: numeric\-string, 4\?\: non\-falsy\-string\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/Git.php
-
message: '#^Offset 2 might not exist on array\{\}\|array\{0\: non\-falsy\-string, 1\: non\-empty\-string, 2\: non\-empty\-string, 3\: numeric\-string, 4\?\: non\-falsy\-string\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/Git.php
-
message: '#^Offset 3 might not exist on array\{\}\|array\{0\: non\-falsy\-string, 1\: non\-empty\-string, 2\: non\-empty\-string, 3\: numeric\-string, 4\?\: non\-falsy\-string\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/Git.php
-
message: '#^Only booleans are allowed in an if condition, string\|false given\.$#'
identifier: if.condNotBoolean
@ -7350,6 +7434,12 @@ parameters:
count: 1
path: src/InsertEdit.php
-
message: '#^Offset 2 might not exist on array\{\}\|array\{0\: non\-falsy\-string, 1\: string, 2\: string, 3\?\: numeric\-string\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/InsertEdit.php
-
message: '#^Only booleans are allowed in &&, PhpMyAdmin\\Dbal\\ResultInterface\|false given on the left side\.$#'
identifier: booleanAnd.leftNotBoolean
@ -7375,7 +7465,7 @@ parameters:
path: src/InsertEdit.php
-
message: '#^Parameter \#1 \$currentRow of method PhpMyAdmin\\InsertEdit\:\:getDefaultValueAndBackupFieldForExistingRow\(\) expects array\<string\|null\>, array given\.$#'
message: '#^Parameter \#1 \$currentRow of method PhpMyAdmin\\InsertEdit\:\:getDefaultValueAndBackupFieldForExistingRow\(\) expects array\<string\|null\>, array\<mixed\> given\.$#'
identifier: argument.type
count: 1
path: src/InsertEdit.php
@ -8482,7 +8572,7 @@ parameters:
path: src/Plugins/Auth/AuthenticationSignon.php
-
message: '#^Parameter \#1 \$options of function session_set_cookie_params expects array\{lifetime\?\: int, path\?\: string\|null, domain\?\: string\|null, secure\?\: bool\|null, httponly\?\: bool\|null, samesite\?\: ''Lax''\|''lax''\|''None''\|''none''\|''Strict''\|''strict''\}, array given\.$#'
message: '#^Parameter \#1 \$options of function session_set_cookie_params expects array\{lifetime\?\: int, path\?\: string\|null, domain\?\: string\|null, secure\?\: bool\|null, httponly\?\: bool\|null, samesite\?\: ''Lax''\|''lax''\|''None''\|''none''\|''Strict''\|''strict''\}, array\<mixed\> given\.$#'
identifier: argument.type
count: 1
path: src/Plugins/Auth/AuthenticationSignon.php
@ -8506,7 +8596,7 @@ parameters:
path: src/Plugins/Auth/AuthenticationSignon.php
-
message: '#^Property PhpMyAdmin\\Config\:\:\$selectedServer \(array\{host\: string, port\: string, socket\: string, ssl\: bool, ssl_key\: string\|null, ssl_cert\: string\|null, ssl_ca\: string\|null, ssl_ca_path\: string\|null, \.\.\.\}\) does not accept non\-empty\-array\.$#'
message: '#^Property PhpMyAdmin\\Config\:\:\$selectedServer \(array\{host\: string, port\: string, socket\: string, ssl\: bool, ssl_key\: string\|null, ssl_cert\: string\|null, ssl_ca\: string\|null, ssl_ca_path\: string\|null, \.\.\.\}\) does not accept non\-empty\-array\<mixed, mixed\>\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugins/Auth/AuthenticationSignon.php
@ -9594,6 +9684,12 @@ parameters:
count: 2
path: src/Plugins/Import/Upload/UploadSession.php
-
message: '#^Only booleans are allowed in an if condition, mixed given\.$#'
identifier: if.condNotBoolean
count: 1
path: src/Plugins/Import/Upload/UploadSession.php
-
message: '#^Only booleans are allowed in \|\|, mixed given on the right side\.$#'
identifier: booleanOr.rightNotBoolean
@ -10341,6 +10437,12 @@ parameters:
count: 1
path: src/Plugins/Transformations/Abs/TextLinkTransformationsPlugin.php
-
message: '#^Only booleans are allowed in &&, mixed given on the right side\.$#'
identifier: booleanAnd.rightNotBoolean
count: 1
path: src/Plugins/Transformations/Abs/TextLinkTransformationsPlugin.php
-
message: '#^Parameter \#1 \$string of function htmlspecialchars expects string, mixed given\.$#'
identifier: argument.type
@ -10552,7 +10654,7 @@ parameters:
path: src/Query/Compatibility.php
-
message: '#^Parameter \#1 \$string of function strtoupper expects string, \(int\|string\) given\.$#'
message: '#^Parameter \#1 \$string of function strtoupper expects string, int\|string given\.$#'
identifier: argument.type
count: 1
path: src/Query/Compatibility.php
@ -11439,6 +11541,12 @@ parameters:
count: 1
path: src/Server/Status/Monitor.php
-
message: '#^Offset 1 might not exist on array\{\}\|array\{non\-falsy\-string, non\-empty\-string\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/Server/Status/Monitor.php
-
message: '#^Only booleans are allowed in a negated boolean, mixed given\.$#'
identifier: booleanNot.exprNotBoolean
@ -11586,7 +11694,7 @@ parameters:
-
message: '#^Method PhpMyAdmin\\Setup\\ConfigGenerator\:\:getBlowfishSecretKey\(\) should return non\-empty\-string but returns string\.$#'
identifier: return.type
count: 2
count: 1
path: src/Setup/ConfigGenerator.php
-
@ -12222,6 +12330,12 @@ parameters:
count: 3
path: src/Table/Search.php
-
message: '#^Parameter \#2 \$array of function implode expects array\<string\>, array\<mixed\> given\.$#'
identifier: argument.type
count: 1
path: src/Table/Search.php
-
message: '#^Parameter \#2 \$names of method PhpMyAdmin\\Table\\Search\:\:getWhereClause\(\) expects string, mixed given\.$#'
identifier: argument.type
@ -12367,7 +12481,7 @@ parameters:
path: src/Table/Table.php
-
message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(mixed\)\: mixed\)\|null, Closure\(array\|bool\|float\|int\|resource\|string\|null, int\=\)\: int given\.$#'
message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(mixed\)\: mixed\)\|null, Closure\(array\|bool\|float\|GMP\|int\|resource\|SimpleXMLElement\|string\|null, int\=\)\: int given\.$#'
identifier: argument.type
count: 1
path: src/Table/Table.php
@ -13032,6 +13146,12 @@ parameters:
count: 1
path: src/Util.php
-
message: '#^Offset 1 might not exist on array\{\}\|array\{non\-falsy\-string, string\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/Util.php
-
message: '#^Only booleans are allowed in a negated boolean, int\<0, 2\> given\.$#'
identifier: booleanNot.exprNotBoolean
@ -13080,6 +13200,12 @@ parameters:
count: 1
path: src/Util.php
-
message: '#^Parameter \#2 \$array of function implode expects array\<string\>, list given\.$#'
identifier: argument.type
count: 1
path: src/Util.php
-
message: '#^Variable static method call on PhpMyAdmin\\Util\.$#'
identifier: staticMethod.dynamicName
@ -13182,6 +13308,12 @@ parameters:
count: 1
path: src/Utils/HttpRequest.php
-
message: '#^Offset 1 might not exist on array\{\}\|array\{non\-falsy\-string, numeric\-string\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/Utils/HttpRequest.php
-
message: '#^Only booleans are allowed in an if condition, string\|false given\.$#'
identifier: if.condNotBoolean
@ -13422,6 +13554,12 @@ parameters:
count: 1
path: src/WebAuthn/WebauthnLibServer.php
-
message: '#^Call to function is_array\(\) with array\<string\> will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: src/ZipExtension.php
-
message: '#^Method PhpMyAdmin\\ZipExtension\:\:getContents\(\) should return array\{error\: string, data\: string\} but returns array\{error\: '''', data\: string\|false\}\.$#'
identifier: return.type
@ -13914,6 +14052,12 @@ parameters:
count: 1
path: tests/unit/Config/FormDisplayTest.php
-
message: '#^Offset 1 might not exist on array\{\}\|array\{non\-falsy\-string, numeric\-string\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: tests/unit/Config/FormTest.php
-
message: '''
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
@ -16576,7 +16720,7 @@ parameters:
path: tests/unit/Table/TableTest.php
-
message: '#^Offset ''col_order'' on non\-empty\-array in isset\(\) always exists and is not nullable\.$#'
message: '#^Offset ''col_order'' on non\-empty\-array\<mixed\> in isset\(\) always exists and is not nullable\.$#'
identifier: isset.offset
count: 1
path: tests/unit/Table/TableTest.php