-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
make:entity
and enums
#1440
Comments
Howdy @klkvsk! Enums are not currently supported in |
I'm not completely sure at the moment, but from what I've observed in the source code, it seems to handle Doctrine types. However, enums aren't recognized as native Doctrine types; they're treated as strings with an additional option labeled enumType. How should we address this in more detail? Currently, all types are well-defined, and an enum could potentially be its own class, residing in a specific directory such as /src/Enum or /src/MySpecialEnums, right? If we decide to integrate this, how should we proceed?
As someone new here (Im just a symfony programmer for many years ^^), I'm eager to contribute and am relying on community support to navigate these enhancements. I'm open to feedback and additional ideas on how to improve enum support in the MakerBundle. |
It seems entity generator is unable to handle enums.
On an existing entity class
make:entity --regenerate
outputs enum's backed type (or is it getting it from mapped field type actually?):Also, when running
make:entity
as a command-line wizard, while creating a property there is no option for enum type.Quick browse of maker-bundle's code showed almost nothing about enums.
Is it really unsupported yet?
Can it be fixed to generate a proper param/return type hint at least?
The text was updated successfully, but these errors were encountered: