Skip to content

Do not convert translatable enum choices into an associative array#7629

Open
Seb33300 wants to merge 1 commit into
EasyCorp:5.xfrom
Seb33300:fix-enums
Open

Do not convert translatable enum choices into an associative array#7629
Seb33300 wants to merge 1 commit into
EasyCorp:5.xfrom
Seb33300:fix-enums

Conversation

@Seb33300
Copy link
Copy Markdown
Contributor

@Seb33300 Seb33300 commented May 29, 2026

Fixes #7242

EasyAdmin was transforming all enum choices into an associative array.
But we should not transform translatable enums and let the EnumType to handle enums with its own logic.

Note: we cannot completely remove the associative array because it is used later in the code to handle translations.
So we just remove keys when passing it to the choices form option.

Different approach from #7243 as suggested by #7243 (comment)

@Seb33300 Seb33300 changed the title Do not convert backed enum choices into an associative array Do not convert translatable enum choices into an associative array May 30, 2026
@rdevaissiere
Copy link
Copy Markdown

Works for me thanks @Seb33300!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken translation of enums implementing TranslatableInterface

2 participants