-
-
Notifications
You must be signed in to change notification settings - Fork 417
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
Enum type fatal error when passing the enum class in Symfony 7.2.3 #1663
Comments
This is really weird, but it seems to be related to the double |
This seems to be related to a composer bug when loading classes with multiple backslashes. I propose a fix to Composer, but I'm not sure if we need to fix this here as well. |
composer/composer#12320 was closed, so I opened #1664 to fix this :) |
Thank you for your amazing work @Fan2Shrek. I instinctively used A sub-section in Creating an Entity Class documentation dedicated to enum usage may be a good idea I think. Because when you google for |
I created a new Symfony 7.2.3 project in a dockerized environment and created a
Task
entity usingmake:entity
command. I just added atitle
property.Then I created a
TaskStatus
enum like so:Then, using
make:entity
again, I edit myTask
entity and fill the form:When I press enter, a fatal error is thrown:
At this point, what I understand is that the enum cannot exists before I try to add it to my entity. But if I delete it and try again, it now says:
By the way, I use a
php:8.3.17-apache
docker image. How am I supposed to use the enum type in my entities? I found nothing in Symfony's docs.The text was updated successfully, but these errors were encountered: