-
-
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
Psalm 6 #3977
Psalm 6 #3977
Conversation
In the remaining issues, there's one I don't know what to do about:
Please help. |
tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php
Outdated
Show resolved
Hide resolved
tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php
Outdated
Show resolved
Hide resolved
69e87fc
to
f9b9f9b
Compare
@morozov the failure in Travis is caused by a warning about using an array of interfaces in calls to |
That should be fine. |
@morozov phpcs fails unless I use |
@greg0ire let's make the needed upgrades and see if we can simplify the annotations. The ones in the driver manager are really concerning. |
Down to 4 errors. |
Down to 2 errors, with which I need help please @morozov 🙏 see the todo list in the original post for details. |
IIRC, it just needs to be an invalid SQL that will cause failure being prepared. An empty string instead of UPD: look at 8adf7f9#diff-c47062aaec500b4bf4ab79095668542cR30. |
b131345
to
b36d497
Compare
c2bc7cc
to
82c218d
Compare
This is what is expected with FETCH_COLUMN
This is precisely what we are testing here.
This hack is temporary and should be removed on 3.0.x
This return type is conditional to $params['wrapperClass']. Luckily, recent versions of Psalm allow documenting it properly. See vimeo/psalm#3277 Note that phpstan is not able to understand this yet, but still attempts to, hence the extra ignore rules.
It confuses both Psalm and PHPStan, and involves complicated mocking.
The php docs are not very clear about that one.
Sorry to comment on an older PR, but this commit causes phpstan to report an error: https://phpstan.org/r/e462e0f9-abc4-44bc-8a9a-80aca2717980 I've asked a support question there, and the author suggested a solution here: phpstan/phpstan#3849 (comment) Would you accept a PR with the second solution? I don't think a third-party library should trigger phpstan errors in a project. |
@pkruithof please go ahead and submit a PR. @greg0ire could you work with PHPStan on finding the root cause as suggested in the first option? |
I just tried the suggestion but it did not help unfortunately, and I'm kind of out of my depth here. 😞 |
@pkruithof let's start with filing a new issue that would reproduce the problem. |
Done 👉 #4264 |
Summary
Pushing although there are still 9 errors left, because they are either blocked, or I need help.
See:
@param
I will of course squash many of the commits together in the end.