diff --git a/composer.json b/composer.json index 3495dc17fed..a1f76028b81 100644 --- a/composer.json +++ b/composer.json @@ -43,8 +43,8 @@ "doctrine/coding-standard": "11.1.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2022.3", - "phpstan/phpstan": "1.9.14", - "phpstan/phpstan-strict-rules": "^1.4", + "phpstan/phpstan": "1.10.0", + "phpstan/phpstan-strict-rules": "^1.5", "phpunit/phpunit": "9.6.3", "psalm/plugin-phpunit": "0.18.4", "squizlabs/php_codesniffer": "3.7.1", diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 29d9a5448ec..3dfbb66ac8d 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -39,11 +39,6 @@ parameters: paths: - src/Schema/Column.php - - - message: '~^Instanceof between Doctrine\\DBAL\\Platforms\\Keywords\\KeywordList and Doctrine\\DBAL\\Platforms\\Keywords\\KeywordList will always evaluate to true\.~' - paths: - - src/Platforms/AbstractPlatform.php - # TODO: remove this once the support for PHP 7 is dropped - message: '~^Strict comparison using !== between int and false will always evaluate to true\.$~' @@ -83,26 +78,10 @@ parameters: path: src/Logging/DebugStack.php - - message: '~Method Doctrine\\DBAL\\Driver\\Mysqli\\Result::rowCount\(\) should return int but returns int(:?<0, max>)?\|string\.~' + message: '~Method Doctrine\\DBAL\\Driver\\Mysqli\\Result::rowCount\(\) should return int but returns int(:?<\-?[0,1], max>)?\|string\.~' paths: - src/Driver/Mysqli/Result.php - # Removing the (int) cast will make Psalm unhappy. - - - message: '~^Casting to int something that''s already int\.$~' - paths: - - src/Driver/Mysqli/Exception/ConnectionError.php - - src/Driver/Mysqli/Exception/ConnectionFailed.php - - src/Driver/Mysqli/Exception/InvalidCharset.php - - src/Driver/Mysqli/Exception/StatementError.php - - # TODO: Turn this bool cast into a strict type check in 4.0.0 - - - message: '~^Casting to bool something that''s already bool\.$~' - paths: - - src/Connections/PrimaryReadReplicaConnection.php - - src/Driver/SQLite3/Driver.php - # Type check for legacy implementations of the Connection interface # TODO: remove in 4.0.0 - "~Call to function method_exists\\(\\) with Doctrine\\\\DBAL\\\\Driver\\\\Connection and 'getNativeConnection' will always evaluate to true\\.~"