-
Notifications
You must be signed in to change notification settings - Fork 110
Closed
Description
doctrine/orm
2.12.0 now supports arrays of enums, see doctrine/orm#9497
This is the syntax:
#[ORM\Column(type: Types::SIMPLE_ARRAY, length: 255, nullable: true, enumType: Foo::class)]
private array $foo = [];
phpstan is reporting:
Property App\Entity\User::$foo type mapping mismatch: backing type string of enum App\Enum\Foo does not match database type array.
Property App\Entity\User::$foo type mapping mismatch: database can contain App\Enum\Foo|null but property expects array.
Property App\Entity\User::$foo type mapping mismatch: property can contain array but database expects App\Enum\Foo|null.
patie, carlitosz, atomatis, noemi-salaun, zackad and 25 more
Metadata
Metadata
Assignees
Labels
No labels