From 1d06a4ca1f9b209cd85acfef0badd1ed055a68d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Alfaiate?= Date: Sat, 30 May 2026 12:22:26 +0700 Subject: [PATCH] Do not convert translatable enum choices into an associative array --- src/Field/Configurator/ChoiceConfigurator.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Field/Configurator/ChoiceConfigurator.php b/src/Field/Configurator/ChoiceConfigurator.php index 301dd1dfd2..738b6d1295 100644 --- a/src/Field/Configurator/ChoiceConfigurator.php +++ b/src/Field/Configurator/ChoiceConfigurator.php @@ -78,6 +78,8 @@ public function configure(FieldDto $field, EntityDto $entityDto, AdminContext $c if ($areChoicesTranslatable && !$choicesSupportTranslatableInterface) { $field->setFormTypeOptionIfNotSet('choices', array_keys($choices)); $field->setFormTypeOptionIfNotSet('choice_label', static fn ($value) => $choices[$value]); + } elseif ($choicesSupportTranslatableInterface && $allChoicesAreEnums) { + $field->setFormTypeOptionIfNotSet('choices', array_values($choices)); } else { $field->setFormTypeOptionIfNotSet('choices', $choices); }