Skip to content

Commit

Permalink
Merge pull request phpmyadmin#19547 from kamil-tekiela/phpstan-2.1.2
Browse files Browse the repository at this point in the history
Update to PHPStan 2.1.2
  • Loading branch information
MauricioFauth authored Jan 21, 2025
2 parents 594e664 + 5a0360d commit 28405cc
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 70 deletions.
39 changes: 20 additions & 19 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 15 additions & 51 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1395,12 +1395,6 @@ parameters:
count: 2
path: src/Config/Validator.php

-
message: '#^Cannot access offset mixed on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 2
path: src/Config/Validator.php

-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
identifier: empty.notAllowed
Expand All @@ -1420,7 +1414,7 @@ parameters:
path: src/Config/Validator.php

-
message: '#^Method PhpMyAdmin\\Config\\Validator\:\:getValidators\(\) should return array\<mixed\> but returns mixed\.$#'
message: '#^Method PhpMyAdmin\\Config\\Validator\:\:getValidators\(\) should return array\<mixed\> but returns array\|null\.$#'
identifier: return.type
count: 2
path: src/Config/Validator.php
Expand Down Expand Up @@ -2868,12 +2862,6 @@ parameters:
count: 1
path: src/Controllers/Import/ImportController.php

-
message: '#^Parameter \#2 \$size of method PhpMyAdmin\\Import\\Import\:\:getNextChunk\(\) expects int, float\|int\<min, \-1\>\|int\<1, max\> given\.$#'
identifier: argument.type
count: 1
path: src/Controllers/Import/ImportController.php

-
message: '#^Parameter \#4 \$backUrl of static method PhpMyAdmin\\Html\\Generator\:\:mysqlDie\(\) expects string, mixed given\.$#'
identifier: argument.type
Expand Down Expand Up @@ -6369,12 +6357,6 @@ parameters:
count: 1
path: src/Dbal/DatabaseInterface.php

-
message: '#^Parameter \#1 \$haystack of function stripos expects string, mixed given\.$#'
identifier: argument.type
count: 2
path: src/Dbal/DatabaseInterface.php

-
message: '#^Parameter \#1 \$path of function basename expects string, mixed given\.$#'
identifier: argument.type
Expand All @@ -6387,18 +6369,6 @@ parameters:
count: 1
path: src/Dbal/DatabaseInterface.php

-
message: '#^Parameter \#1 \$version of static method PhpMyAdmin\\Query\\Utilities\:\:versionToInt\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Dbal/DatabaseInterface.php

-
message: '#^Parameter \#2 \$arrays of function array_diff expects an array of values castable to string, array\<string, PhpMyAdmin\\Config\|PhpMyAdmin\\Dbal\\DatabaseInterface\|PhpMyAdmin\\UserPrivilegesFactory\> given\.$#'
identifier: argument.type
count: 1
path: src/Dbal/DatabaseInterface.php

-
message: '#^Parameter \#2 \$b of static method PhpMyAdmin\\Query\\Utilities\:\:usortComparisonCallback\(\) expects array\<mixed\>, mixed given\.$#'
identifier: argument.type
Expand Down Expand Up @@ -10801,7 +10771,7 @@ parameters:
path: src/Plugins/Auth/AuthenticationSignon.php

-
message: '#^Parameter \#1 \$options of function session_set_cookie_params expects array\{lifetime\?\: int, path\?\: string, domain\?\: string\|null, secure\?\: bool, httponly\?\: bool, samesite\?\: string\}, array given\.$#'
message: '#^Parameter \#1 \$options of function session_set_cookie_params expects array\{lifetime\?\: int, path\?\: string, domain\?\: string\|null, secure\?\: bool, httponly\?\: bool, samesite\?\: ''Lax''\|''lax''\|''None''\|''none''\|''Strict''\|''strict''\}, array given\.$#'
identifier: argument.type
count: 1
path: src/Plugins/Auth/AuthenticationSignon.php
Expand Down Expand Up @@ -12441,12 +12411,6 @@ parameters:
count: 1
path: src/Plugins/Import/ImportOds.php

-
message: '#^Variable property access on SimpleXMLElement\.$#'
identifier: property.dynamicName
count: 2
path: src/Plugins/Import/ImportOds.php

-
message: '#^Binary operation "\." between ''GeomFromText\(\\'''' and mixed results in an error\.$#'
identifier: binaryOp.invalid
Expand Down Expand Up @@ -16578,12 +16542,6 @@ parameters:
count: 1
path: src/UserPrivilegesFactory.php

-
message: '#^Parameter \#3 \$subject of function preg_replace expects array\<float\|int\|string\>\|string, string\|null given\.$#'
identifier: argument.type
count: 1
path: src/UserPrivilegesFactory.php

-
message: '#^Parameter \#4 \$routines of class PhpMyAdmin\\UserPrivileges constructor expects bool, mixed given\.$#'
identifier: argument.type
Expand Down Expand Up @@ -17478,6 +17436,12 @@ parameters:
count: 2
path: tests/end-to-end/TestBase.php

-
message: '#^Only booleans are allowed in an if condition, string\|null given\.$#'
identifier: if.condNotBoolean
count: 1
path: tests/end-to-end/TestBase.php

-
message: '#^Parameter \#1 \$by of method Facebook\\WebDriver\\Remote\\RemoteWebDriver\:\:findElement\(\) expects Facebook\\WebDriver\\WebDriverBy, mixed given\.$#'
identifier: argument.type
Expand Down Expand Up @@ -17523,7 +17487,7 @@ parameters:
-
message: '#^Parameter \#1 \$handle of method Facebook\\WebDriver\\Remote\\RemoteTargetLocator\:\:window\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 3
count: 2
path: tests/end-to-end/TestBase.php

-
Expand Down Expand Up @@ -19776,12 +19740,6 @@ parameters:
count: 2
path: tests/unit/IpAllowDenyTest.php

-
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertSame\(\) with array\{\} and array\{\000PhpMyAdmin\\ListDatabase\000dbi\: PhpMyAdmin\\Dbal\\DatabaseInterface, \000PhpMyAdmin\\ListDatabase\000config\: PhpMyAdmin\\Config, \000PhpMyAdmin\\ListDatabase\000userPrivilegesFactory\: PhpMyAdmin\\UserPrivilegesFactory\} will always evaluate to false\.$#'
identifier: staticMethod.impossibleType
count: 1
path: tests/unit/ListDatabaseTest.php

-
message: '''
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
Expand Down Expand Up @@ -20184,6 +20142,12 @@ parameters:
count: 13
path: tests/unit/Plugins/Auth/AuthenticationSignonTest.php

-
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertSame\(\) with array\{lifetime\: 0, path\: ''/'', domain\: '''', secure\: false, httponly\: false, samesite\: ''''\} and array\{lifetime\: int\<0, max\>, path\: non\-falsy\-string, domain\: string, secure\: bool, httponly\: bool, samesite\: ''Lax''\|''lax''\|''None''\|''none''\|''Strict''\|''strict''\} will always evaluate to false\.$#'
identifier: staticMethod.impossibleType
count: 1
path: tests/unit/Plugins/Auth/AuthenticationSignonTest.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 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, \.\.\.\}\.$#'
identifier: assign.propertyType
Expand Down

0 comments on commit 28405cc

Please sign in to comment.