Skip to content
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

Merged
merged 1 commit into from
Aug 3, 2018

Conversation

morozov
Copy link
Member

@morozov morozov commented Aug 3, 2018

Q A
Type improvement
BC Break no
Fixed issues none

As of #3025, the develop builds fail due to the issues which didn't exist and weren't fixed in master.

#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.

@@ -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~'
Copy link
Member Author

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?

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Member Author

@morozov morozov Aug 3, 2018

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?

@morozov morozov requested a review from Majkl578 August 3, 2018 06:35
@morozov morozov self-assigned this Aug 3, 2018
@morozov morozov added the CI label Aug 3, 2018
@morozov morozov added this to the 3.0.0 milestone Aug 3, 2018
@Ocramius
Copy link
Member

Ocramius commented Aug 3, 2018

👍

@Ocramius Ocramius merged commit e646ba5 into doctrine:develop Aug 3, 2018
@morozov morozov deleted the phpstan-develop branch August 3, 2018 17:13
morozov pushed a commit that referenced this pull request Aug 7, 2018
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Sep 29, 2018
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Oct 7, 2018
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Oct 7, 2018
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Nov 14, 2018
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Nov 14, 2018
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Nov 25, 2018
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Dec 6, 2018
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Jan 20, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit to morozov/dbal that referenced this pull request Feb 6, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit to morozov/dbal that referenced this pull request Feb 6, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Feb 7, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Feb 20, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Feb 22, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Mar 15, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Mar 15, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Mar 18, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Apr 16, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request May 6, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request May 23, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit to morozov/dbal that referenced this pull request May 31, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Jun 13, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Jun 27, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit to morozov/dbal that referenced this pull request Aug 26, 2019
Fixed and suppressed issues found by PHPStan on develop
morozov pushed a commit that referenced this pull request Nov 2, 2019
Fixed and suppressed issues found by PHPStan on develop
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
@morozov morozov removed this from the 4.0.0 milestone Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants