-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
support PHP Enums #16
Conversation
support PHP Enums
if $value is an instance of \UnitEnum but $value->name different from $expected then it will check if (string) $value equals $expected, but we can't cast (string) $value from a Enum |
Hi, thanks for your PR! Sorry for my late reply. |
Test for enums
Hi, I update the test it_works_with_enumerated_casts to show that when we update an enum attribute that doesn't have an event match with $value->name === $expected, it try to cast to (string) $value === $expected |
Operations priority might differ from what you expect: please wrap needed with '(...)'
Any chance to get this merged? Solved exception on my side perfectly fine - thanks @patrocle |
@jpkleemans ? 🥴🥴 |
@jpkleemans Hi, can you merge this ? Thanks |
@patrocle thanks for adding the test. But it looks like it fails? Could you have a look at it? |
This was necessray because some types cannot be converted to string, and it was throwing an exception when casting an Enum. This work was done based on the PR opened by @patrocle on jpkleemans#16
Fixed in #18 |
support PHP Enums hasn't been merged