EasyAdminBundle
EasyAdminBundle copied to clipboard
Fix for issue #7242 : broken translations for enums in forms
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.