-
Notifications
You must be signed in to change notification settings - Fork 88
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
DIC parameter is interpreted as *never* #286
Comments
/cc @VincentLanglet |
What is your config ? @shyim I'll need more explanation about the Best would be to reproduce this error with the tests of this repository |
I ran
And got no error |
@shyim clearly misunderstood what @VincentLanglet meant with "Best would be to reproduce this error with the tests of this repository". |
Yes, but if I could have been able to reproduce the error with his repository, I would have write the fix/test by myself. I'm fine with both solution. |
I think all you need to be able to fix this is to see how |
I reproduced the error with his repository. I have
And with the code
I have
Phpstan is thinking that the parameter are the same because it doesn't change the value with but Phpstan shouldn't even use the container xml here, since the test is doing |
To simplify the issue
is reported by phpstan
To me this is wrong, but not related to my changes. And it will require to consider differently Containerbuilder which are injected as a service, and ContainerBuilder which are freshly created. Doesn't seems like an easy issue to solve, but I may be wrong @ondrejmirtes. |
Since commit 2063d60 I have a error that a dic parameter is never.
I am doing in the test code:
That both parameter keys which are arrays are the same. Since that commit I get
I took the parameter out and "over-typed" it with an var annotation
This produces that next strange error
The text was updated successfully, but these errors were encountered: