Skip to content

PHPStan 1.10 #5932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
23 changes: 1 addition & 22 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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\.$~'
Expand Down Expand Up @@ -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\\.~"
Expand Down