-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
How to use with native PHP enum #236
Comments
@SirMishaa Hi. Maybe this article could help you https://www.doctrine-project.org/2022/01/11/orm-2.11.html |
The reason we wanted to use PHP enums was better reason about the value in our application logic and the reason to keep using DoctrineEnumBundle was to enforce the value in the database. We've had success with enums and DoctrineEnumBundle. Here is our implementation.
And we reference the enum in the Type.
However, the
and
|
@fre5h If you could incorporate the unwrapping of the enum in the validator, then this bundle would support php enums. |
@hackzilla thanks for advice, I'll consider this 👍 |
Hello,
According this example :
I wonder why we don't use PHP's native enumerations?
I have this enum, and I'd want to use as a type :
Regards ❤️
The text was updated successfully, but these errors were encountered: