minor: ChoiceType callable deprecation after/before seems wrong
That is on me 3 years ago !
This commit is contained in:
parent
a288a74d74
commit
11ee84c09e
|
@ -297,19 +297,17 @@ Form
|
||||||
`ArrayAccess` in `ResizeFormListener::preSubmit` method has been removed.
|
`ArrayAccess` in `ResizeFormListener::preSubmit` method has been removed.
|
||||||
|
|
||||||
* Using callable strings as choice options in ChoiceType is not supported
|
* Using callable strings as choice options in ChoiceType is not supported
|
||||||
anymore in favor of passing PropertyPath instances.
|
anymore.
|
||||||
|
|
||||||
Before:
|
Before:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
'choice_value' => new PropertyPath('range'),
|
|
||||||
'choice_label' => 'strtoupper',
|
'choice_label' => 'strtoupper',
|
||||||
```
|
```
|
||||||
|
|
||||||
After:
|
After:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
'choice_value' => 'range',
|
|
||||||
'choice_label' => function ($choice) {
|
'choice_label' => function ($choice) {
|
||||||
return strtoupper($choice);
|
return strtoupper($choice);
|
||||||
},
|
},
|
||||||
|
|
Reference in New Issue