Skip to content

Add documentation for enum property.rst #20887

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: 7.2
Choose a base branch
from

Conversation

cadot-eu
Copy link
Contributor

A note and an example class for the enum type which has an undocumented peculiarity on the path to give

A note and an example class for the enum type which has an undocumented peculiarity on the path to give
@xabbuh
Copy link
Member

xabbuh commented Apr 17, 2025

I am not sure I understand what this is trying to clarify. Can you elaborate a bit on your idea?

@cadot-eu
Copy link
Contributor Author

When adding an enum type property, you must put a path and not just the name of the entity as for relationships for example.

// src/Entity/Enums/State.php
namespace App\Entity\Enums;

enum Etat: string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
enum Etat: string
enum State: string

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like your Readme.me github ;-)

patchs

Co-authored-by: Oskar Stark <oskarstark@googlemail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants