Skip to content

Commit 71b11c3

Browse files
committed
minor symfony#17625 Fix choice_label (erichard)
This PR was submitted for the 6.2 branch but it was merged into the 5.4 branch instead. Discussion ---------- Fix choice_label `match` cannot by used directly by `choice_label` as the `$choice` variable does not exist Commits ------- 76341b2 Fix choice_label
2 parents 256c55e + 76341b2 commit 71b11c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reference/forms/types/enum.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ dots or spaces). If you need more flexibility for these labels, use the
6363

6464
->add('textAlign', EnumType::class, [
6565
'class' => TextAlign::class,
66-
'choice_label' => match ($choice) {
66+
'choice_label' => fn ($choice) => match ($choice) {
6767
TextAlign::Left => 'text_align.left.label',
6868
TextAlign::Center => 'text_align.center.label',
6969
TextAlign::Right => 'text_align.right.label',

0 commit comments

Comments
 (0)