-
-
Notifications
You must be signed in to change notification settings - Fork 437
Closed
Labels
Description
It seems entity generator is unable to handle enums.
On an existing entity class
#[ORM\Entity]
class MyEntity
{
// ...
#[ORM\Column(nullable: false)]
protected MyEntityType $type;
// ...
make:entity --regenerate outputs enum's backed type (or is it getting it from mapped field type actually?):
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): static
{
$this->type = $type;
return $this;
}
Also, when running make:entity as a command-line wizard, while creating a property there is no option for enum type.
Quick browse of maker-bundle's code showed almost nothing about enums.
Is it really unsupported yet?
Can it be fixed to generate a proper param/return type hint at least?