diff --git a/UPGRADE-2.8.md b/UPGRADE-2.8.md index 67e1c0e66f18..95a3c6b77fb9 100644 --- a/UPGRADE-2.8.md +++ b/UPGRADE-2.8.md @@ -251,6 +251,9 @@ Form ``` + + * The class `ArrayKeyChoiceList` was deprecated and will be removed in Symfony + 3.0. Use `ArrayChoiceList` instead. Translator ---------- diff --git a/UPGRADE-3.0.md b/UPGRADE-3.0.md index 5b86950fc694..d6a056a63433 100644 --- a/UPGRADE-3.0.md +++ b/UPGRADE-3.0.md @@ -312,6 +312,9 @@ UPGRADE FROM 2.x to 3.0 * The `Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList` class has been removed in favor of `Symfony\Component\Form\ChoiceList\ArrayChoiceList`. + * The `Symfony\Component\Form\ChoiceList\ArrayKeyChoiceList` class has been removed in + favor of `Symfony\Component\Form\ChoiceList\ArrayChoiceList`. + ### FrameworkBundle * The `config:debug`, `container:debug`, `router:debug`, `translation:debug` diff --git a/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php b/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php index 7c3c107d0f72..fa2e3973f586 100644 --- a/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php +++ b/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Form\ChoiceList; +@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); + use Symfony\Component\Form\Exception\InvalidArgumentException; /** diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/ArrayKeyChoiceListTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/ArrayKeyChoiceListTest.php index 5cbadf6e0fe7..1f1643158d48 100644 --- a/src/Symfony/Component/Form/Tests/ChoiceList/ArrayKeyChoiceListTest.php +++ b/src/Symfony/Component/Form/Tests/ChoiceList/ArrayKeyChoiceListTest.php @@ -15,6 +15,8 @@ /** * @author Bernhard Schussek + * + * @group legacy */ class ArrayKeyChoiceListTest extends AbstractChoiceListTest {