8000 Add Upgrade entry · symfony/symfony@3cda2ef · GitHub
[go: up one dir, main page]

Skip to content

Commit 3cda2ef

Browse files
committed
Add Upgrade entry
1 parent d113e7d commit 3cda2ef

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

UPGRADE-4.2.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
UPGRADE FROM 4.1 to 4.2
2+
=======================
3+
4+
Form
5+
----
6+
7+
* Deprecated `ChoiceLoaderInterface` implementation in `CountryType`, `LanguageType`, `LocaleType` and `CurrencyType`. Use the "choice_loader" option instead.
8+
9+
Before:
10+
```php
11+
class MyCountryType extends CountryType
12+
{
13+
public function loadChoiceList()
14+
{
15+
// override the method
16+
}
17+
}
18+
```
19+
20+
After:
21+
```php
22+
class MyCountryType extends AbstractType
23+
{
24+
public function getParent()
25+
{
26+
return CountryType::class;
27+
}
28+
29+
public function configureOptions(OptionsResolver $resolver)
30+
{
31+
$resolver->setDefault('choice_loader', ...); // override the option instead
32+
}
33+
}
34+
```

0 commit comments

Comments
 (0)
0