-
Notifications
You must be signed in to change notification settings - Fork 549
Fix #13963 with unit tests. #4786
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
base: 2.1.x
Are you sure you want to change the base?
Conversation
|
Hi, I think you're not handling correctly the flag for non-string value I recommend you to add test for You certainly need to do the check you did but after a toString call. |
…_EMPTY_STRING_NULL.
|
Thanks for your feedback! I added some cases and tried to be as precise as I could on type expectations. I feel like it's starting to get too complex when going deeper on union types. I'm not feeling fluent enough with PHPStan's API but I did my best. Again, tell me if I got something wrong here 😉 |
|
I feel like it could be simpler to look for something like with Some existing tests will fail, but I think it's an improvement. to fix. This is something related to (I think) |
|
I think you could try something like https://github.com/phpstan/phpstan-src/compare/2.1.x...VincentLanglet:phpstan-src:fix/filter_var?expand=1 with all your existing tests @niconoe- |
Fixes phpstan/phpstan#13963