diff --git a/src/Field/Configurator/ChoiceConfigurator.php b/src/Field/Configurator/ChoiceConfigurator.php index 8db5e14430..24847bbf54 100644 --- a/src/Field/Configurator/ChoiceConfigurator.php +++ b/src/Field/Configurator/ChoiceConfigurator.php @@ -52,7 +52,10 @@ public function configure(FieldDto $field, EntityDto $entityDto, AdminContext $c $enumTypeClass = $field->getDoctrineMetadata()->get('enumType'); if (0 === \count($choices) && null !== $enumTypeClass && enum_exists($enumTypeClass)) { $choices = $enumTypeClass::cases(); - } elseif ($allChoicesAreEnums) { + $allChoicesAreEnums = true; + } + + if ($allChoicesAreEnums) { $processedEnumChoices = []; foreach ($choices as $choice) { if ($choice instanceof \BackedEnum) {