Skip to content

Conversation

@trckster
Copy link
Contributor

There was a problem when passing UnitEnum instance to the Enum rule, not BackedEnum. UnitEnum doesn't have tryFrom method, but in the first condition there is a check that such method exists.
Basically, what we should do is just swap first condition with the second. If $value instanceof $this->type is true, it is surely enum, no matter Backed or not.

@taylorotwell taylorotwell merged commit b6b4a19 into laravel:9.x Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants