mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Error retrieving entity with a "Simple array of Enum type" property #7415
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Legendary4226 on GitHub (Sep 11, 2024).
Bug Report
Summary
An error while retrieving entities from the database in the case of a multiple enum property created with the Symfony maker.
Error
App\Constant\Enum\MyIntEnum::from(): Argument #1 ($value) must be of type int, string givenCurrent behavior
How to reproduce
The property inside of my entity (generated via the Symfony maker):
My Enum :
Expected behavior
No errors, the entity is loaded properly with the $enums property as an array of "array<MyIntEnum>"