You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to get basic enumerations to work for a package of mine, but I keep hitting walls (also see #42648)
When trying to use getEnumCastableAttributeValue / setEnumCastableAttribute this works perfectly, but when using toArray after setting a basic enum value, UnitEnum instance that is, it is casting it back in to an enum and is trying to use it's value property, on line 301 in HasAttributes.
ah sorry, we received tons of issues about a symfony breakage and thought this one was one as well. There's no bug here though. The behavior you mentioned isn't supported. Please see Rodrigo's comment.
Description:
I have been trying to get basic enumerations to work for a package of mine, but I keep hitting walls (also see #42648)
When trying to use getEnumCastableAttributeValue / setEnumCastableAttribute this works perfectly, but when using toArray after setting a basic enum value, UnitEnum instance that is, it is casting it back in to an enum and is trying to use it's value property, on line 301 in HasAttributes.
Steps To Reproduce:
just clone and install https://github.com/henzeb/laravelCastbug
then run ./artisan test:bug
You can find the code in the standard User.php model, \App\MyUnitEnum enum and in \App\Console\Commands\testBugCommand.
The text was updated successfully, but these errors were encountered: