EnumType ?
seb-jean opened this issue · 8 comments
Hey :),
Would it be cool to propose the EnumType
type in PostType
?
What do you think ?
Do you have a good use case for this? Please, feel free to share
A post status like WordPress ?
https://wordpress.org/support/article/post-status/#default-statuses
I'd prefer if we didn't modify code just to use Enums. Given that it's a PHP feature, not a Symfony feature, we are not required to use it if we don't find a good use case for it.
I've looked into code and the only "group of constants" (a good indicator to introduce Enums) is this one:
demo/src/Security/PostVoter.php
Lines 31 to 33 in f1ee7c6
What do you think? Thanks!
The idea was to show that EnumType
exists.
@javiereguiluz those are constants for the permission attributes, which must be strings, not enums. So they are not a good candidate.
I close the issue?
Btw, if the goal is to showcase the doctrine/orm feature supporting enums (as suggested by the ticket title, as enumType
in the name of the configuration setting for that feature), such use case needs to be found in the data model.
Yes, that's it, that's the goal.