-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fixed and suppressed issues found by PHPStan on develop #3238
Conversation
@@ -24,7 +24,7 @@ parameters: | |||
- '~^Method Doctrine\\DBAL\\Driver\\SQLSrv\\SQLSrvConnection::errorCode\(\) should return string\|null but returns false\.\z~' | |||
|
|||
# http://php.net/manual/en/pdo.sqlitecreatefunction.php | |||
- '~^Call to an undefined method Doctrine\\DBAL\\Driver\\PDOConnection::sqliteCreateFunction\(\)\.\z~' | |||
- '~^Call to an undefined method PDO::sqliteCreateFunction\(\)\.\z~' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Majkl578 while I understand the PHPStan's inability to use stubbed PDO::SQLSRV_*
constants, what's the reason we should white-list this method? As long as pdo_sqlite
is loaded on Travis, shouldn't PHPStan be able to see it via the extension reflection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as pdo_sqlite is loaded
Exactly, as long as it is loaded. And pdo_sqlite is not direct dependency in composer.json, so you may not have it enabled locally. And polyfills can't add methods/constants to existing classes.
Maybe we should have two phpstan configs with specific ignores for Travis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is als why I disabled reportUnmatchedIgnoredErrors
, since different people/environments have different extensions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. I thought this issue was reproducible despite whether pdo_sqlite
was loaded or not.
The necessity to use reportUnmatchedIgnoredErrors()
across the board and the fact that PHP extensions can add members to existing classes (which is impossible in PHP) looks like a ground for PHPStan to implement this "extensibility" feature for stubs as well. I.e. it should initialize from the extension reflection and then merge the stubbed symbols in. Does it sound like a reasonable feature request?
👍 |
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
Fixed and suppressed issues found by PHPStan on develop
As of #3025, the
develop
builds fail due to the issues which didn't exist and weren't fixed inmaster
.#3236 and #3237 have been separately filed as release blockers for
3.0
since fixing them requires a deeper understanding of the underlying issues than I currently have.