diff --git a/composer.json b/composer.json index ab12807dace..3553f56f8e0 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "doctrine/coding-standard": "12.0.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2023.1", - "phpstan/phpstan": "1.11.1", + "phpstan/phpstan": "1.11.5", "phpstan/phpstan-strict-rules": "^1.6", "phpunit/phpunit": "9.6.19", "psalm/plugin-phpunit": "0.18.4", diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 9c3b2389430..e7a2aad5461 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -146,5 +146,11 @@ parameters: # Ignore the possible false return value of db2_num_rows(). - '~^Method Doctrine\\DBAL\\Driver\\IBMDB2\\Connection\:\:exec\(\) should return int but returns int<0, max>\|false\.$~' - '~^Method Doctrine\\DBAL\\Driver\\IBMDB2\\Result\:\:rowCount\(\) should return int but returns int<0, max>\|false\.$~' + + # This is a rather complicated closure setup. We understand this, so PHPStan doesn't have to. + - + 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\.$#' + path: src/Portability/Converter.php + includes: - vendor/phpstan/phpstan-strict-rules/rules.neon