Skip to content

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

Open
@whataboutpereira

Description

@whataboutpereira

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';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions