laminas-filter icon indicating copy to clipboard operation
laminas-filter copied to clipboard

add new filter to filter to an enum

Open reinfi opened this issue 2 years ago • 1 comments

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.

reinfi avatar Dec 30 '22 21:12 reinfi

When psalm is running on php8.1 everything is now working. But still no idea how to handle that in the ci pipeline.

reinfi avatar Jan 12 '23 03:01 reinfi