Skip to content

Commit b296910

Browse files
committed
feature symfony#16690 [Form] Deprecated ArrayKeyChoiceList (webmozart)
This PR was merged into the 2.8 branch. Discussion ---------- [Form] Deprecated ArrayKeyChoiceList | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 5386752 [Form] Deprecated ArrayKeyChoiceList
2 parents 6dacdc4 + 5386752 commit b296910

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

UPGRADE-2.8.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,13 @@ Form
251251
<tag name="form.type_extension" extended-type="Symfony\Component\Form\Extension\Core\Type\TextType" />
252252
</service>
253253
```
254-
254+
255255
* The `TimezoneType::getTimezones()` method was deprecated and will be removed
256256
in Symfony 3.0. You should not use this method.
257257

258+
* The class `ArrayKeyChoiceList` was deprecated and will be removed in Symfony
259+
3.0. Use `ArrayChoiceList` instead.
260+
258261
Translator
259262
----------
260263

UPGRADE-3.0.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,9 @@ UPGRADE FROM 2.x to 3.0
315315
* The `TimezoneType::getTimezones()` method was removed. You should not use
316316
this method.
317317

318+
* The `Symfony\Component\Form\ChoiceList\ArrayKeyChoiceList` class has been removed in
319+
favor of `Symfony\Component\Form\ChoiceList\ArrayChoiceList`.
320+
318321
### FrameworkBundle
319322

320323
* The `config:debug`, `container:debug`, `router:debug`, `translation:debug`

src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\Form\ChoiceList;
1313

14+
@trigger_error('The '.__NAMESPACE__.'\ArrayKeyChoiceList class is deprecated since version 2.8 and will be removed in 3.0. Use '.__NAMESPACE__.'\ArrayChoiceList instead.', E_USER_DEPRECATED);
15+
1416
use Symfony\Component\Form\Exception\InvalidArgumentException;
1517

1618
/**

src/Symfony/Component/Form/Tests/ChoiceList/ArrayKeyChoiceListTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
/**
1717
* @author Bernhard Schussek <[email protected]>
18+
*
19+
* @group legacy
1820
*/
1921
class ArrayKeyChoiceListTest extends AbstractChoiceListTest
2022
{

0 commit comments

Comments
 (0)