Skip to content

Commit 9e47cd8

Browse files
SimperfitAmrouche Hamza
authored and
Amrouche Hamza
committed
minor: ChoiceType callable deprecation after/before seems wrong
That is on me 3 years ago !
1 parent a288a74 commit 9e47cd8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

UPGRADE-4.0.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,26 +297,24 @@ Form
297297
`ArrayAccess` in `ResizeFormListener::preSubmit` method has been removed.
298298

299299
* Using callable strings as choice options in ChoiceType is not supported
300-
anymore in favor of passing PropertyPath instances.
300+
anymore in favor of passing \Callable.
301301

302302
Before:
303303

304304
```php
305-
'choice_value' => new PropertyPath('range'),
306305
'choice_label' => 'strtoupper',
307306
```
308307

309308
After:
310309

311310
```php
312-
'choice_value' => 'range',
313311
'choice_label' => function ($choice) {
314312
return strtoupper($choice);
315313
},
316314
```
317315

318316
* Caching of the loaded `ChoiceListInterface` in the `LazyChoiceList` has been removed,
319-
it must be cached in the `ChoiceLoaderInterface` implementation instead.
317+
it must be cached in the `ChoiceLoaderInterface` implementation instead.
320318

321319
* Calling `isValid()` on a `Form` instance before submitting it is not supported
322320
anymore and raises an exception.

0 commit comments

Comments
 (0)