-
Notifications
You must be signed in to change notification settings - Fork 27
False positive on Assert::upper()
always evaluates as true
#85
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
Comments
I broke this and will look into it @ondrejmirtes from a type perspective everything is fine here, but the "integration" with phpstan seems to be problematic then. Is there a way to add such kind of phpstan integration tests here to prevent regressions? So far we're only testing the types. UPDATE: I think I found it. UPDATE2: No, I think I didn't xD UPDATE3: guess I need I guess I was taking too many shortcuts with my re-used non-empty-string expression :/ |
@p4veI are you using the phpstan-strict-rules extension too? |
Yes, I am. |
@ondrejmirtes there are more global As I know how busy you are - maybe it makes sense to just revert those 2 commits for now? I'd like to add integration / regression tests then too to avoid such failures in the future. Sorry for the troubles caused. |
Created #89 which fixes this by reverting and adding the longed-for regression test |
@herndlm Thanks for trying to improve PHPStan's extensions, things like this happen, don't let it discourage you to try again 💙 |
@ruudk thx. Yeah, don't worry about that 😅 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hello I just updated phpstan-webmozart-assert to v1.0.7 and my codebase started reporting this error:
It's failing in the following class construct
I'm not using the non-empty-string type assertion anywhere so it must be resolved from the length assertion, however that doesn't ensure what upper is doing.
Thank you for looking into this, and all your great work.
The text was updated successfully, but these errors were encountered: