[PHP 8.5] add support for FILTER_THROW_ON_FAILURE for filter_var#4495
[PHP 8.5] add support for FILTER_THROW_ON_FAILURE for filter_var#4495ondrejmirtes merged 1 commit intophpstan:2.1.xfrom
Conversation
4413bd9 to
63be548
Compare
|
This pull request has been marked as ready for review. |
If the current test fails when the src/ changes are reverted then I'm fine with it 😊 Another approach would be to add a test to the "catch unthrown exception" rule.
Thanks to the throw type extension, PHPStan doesn't need the PHPDoc. It might be a good idea to add it to phpstorm-stubs if you care about PhpStorm users separately 😊
You can in a new PR if you'd want. Thank you! |
|
I updated #4418 with this new flag. |
Adds support for
FILTER_THROW_ON_FAILUREforfilter_var. There are still stuff I need to figure out:@throwstag to function in phpstorm-stubs repo? Or anywhere in PHPStan. Couldn't figure out how to conditionally add it only for PHP 8.5 in phpstorm-stubs repo.FILTER_THROW_ON_FAILUREandFILTER_NULL_ON_FAILUREis not allowed. Should we have a new rule for that?If anyone can help me with those questions, that'd be helpful!