laminas-filter
laminas-filter copied to clipboard
add new filter to filter to an enum
Q | A |
---|---|
Documentation | no |
Bugfix | no |
BC Break | no |
New Feature | yes |
RFC | no |
QA | no |
Description
I added a filter to filter a given value to an enum. Is a bit like the pull request here.
I'm unsure if the filter should return the original value if it is not in the enum or null. I actually added it as null because than you can be sure that your value is either null or the expected enum.
Hopefully I added everything related to your contribution guidelines.
Of course this filter only works > PHP 8.0.
And I think psalm will fail for my new class, but hopefully someone of you can help me how to solve it.
When psalm is running on php8.1 everything is now working. But still no idea how to handle that in the ci pipeline.