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
PDO: support PDOStatement::setFetchMode()
#258
Conversation
hmm maybe those errors are related to the multiple-signautres of PDOStatement::setFetchMode. I could not reproduce the problems on phpstan.org |
You'll want to add a test for
as I ran into the same issue in my PR. |
good point @xPaw - thx. @ondrejmirtes do you have an idea/a hint, how a type specifying extension could trigger the signature error, which don't occur without the specifying extension? |
This message says that the type of |
@ondrejmirtes thx for the hint. I did some debugging locally and I can see that I never specify the type of I somehow have the feeling that the underlying problem is related to the fact, that I have no further idea. do you have another tip, or maybe could even have a closer look at it? the problem can be reproduced when checking out this PR and
|
The type you're specifying it to intersected with the type it already has leads to NeverType. |
even if I use "overwrite=true", as I do? said differently: the phpunit tests show me that phpstan is picking up my type as I want it to. only phpstan itself is erroring, which kind of sounds like a false positive then? |
Not with overwrite, that would be a different problem. Don't be afraid to fire up Xdebug and see what's going on. |
I guess I tracked it down to: where I think phpstan is wrong as it concludes these 2 |
Please write a failing test case for that in |
just verified the new test works with phpstan@master |
closes #255
requires phpstan-fix phpstan/phpstan#6620