Skip to content
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

Doctrine DBAL 4.2 ships an Types::ENUM which should be preferred over implementing custom types for ENUM fields. #619

Open
whataboutpereira opened this issue Oct 21, 2024 · 0 comments

Comments

@whataboutpereira
Copy link

New developments concerning enum types are out now:

Doctrine DBAL 4.2 ships an Types::ENUM which should be preferred over implementing custom types for ENUM fields.

doctrine/orm#11666
doctrine/orm#11668

The following ways to use enums are yielding Property App\Entity\Project::$status: Doctrine type "enum" does not have any registered descriptor.

    #[ORM\Column(type: Types::ENUM)]
    private ?ProjectStatus $status = ProjectStatus::Open;
    #[ORM\Column(type: Types::ENUM, options: ['values' => ['open', 'locked', 'confirmed']])]
    private ?string $status = 'open';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant