EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

Fix for issue #7242 : broken translations for enums in forms

Open FoxCie opened this issue 2 months ago • 0 comments

With symfony/form >= v7.3.5, EnumType uses the keys of the choices option as labels for the enum cases, breaking the translation that happened previously when enum implements TranslatableInterface. The translation now occurs only when the choices option has integer keys (more precisely, currently only if it satisfies array_list()). Fixing this by changing the way ChoiceFields are configured with the ChoiceConfigurator, to define the choices option with integer keys when the enum is translatable.

FoxCie avatar Nov 17 '25 18:11 FoxCie