From 73d874ce76ce420b8532f2e7236f2abebcf0e56d Mon Sep 17 00:00:00 2001 From: XitasoChris Date: Mon, 20 Jul 2015 16:52:09 +0200 Subject: [PATCH 1/2] Add deprecation notice to "choice_list" option of ChoiceType Per https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.7.md the choice_list option of ChoiceType is deprecated as of Symfony 2.7. It is recommended to use choices or choice_loader, however the latter does not have a documentation entry yet. --- reference/forms/types/choice.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reference/forms/types/choice.rst b/reference/forms/types/choice.rst index ba672ebf3b3..cd299ebaa85 100644 --- a/reference/forms/types/choice.rst +++ b/reference/forms/types/choice.rst @@ -102,6 +102,11 @@ is the item value and the array value is the item's label:: choice_list ~~~~~~~~~~~ +.. caution:: + + The ``choice_list`` option of ChoiceType was deprecated in Symfony 2.7. + You should use ``choices_as_values`` or ``choice_loader`` now. + **type**: :class:`Symfony\\Component\\Form\\Extension\\Core\\ChoiceList\\ChoiceListInterface` This is one way of specifying the options to be used for this field. From e3581488f8b4f4d9240b7b6e83302421d21a5127 Mon Sep 17 00:00:00 2001 From: Christopher Gross Date: Wed, 22 Jul 2015 08:41:56 +0200 Subject: [PATCH 2/2] change deprecation notice on choice_list to point to choices --- reference/forms/types/choice.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/forms/types/choice.rst b/reference/forms/types/choice.rst index cd299ebaa85..e8a22c6c7fc 100644 --- a/reference/forms/types/choice.rst +++ b/reference/forms/types/choice.rst @@ -105,7 +105,7 @@ choice_list .. caution:: The ``choice_list`` option of ChoiceType was deprecated in Symfony 2.7. - You should use ``choices_as_values`` or ``choice_loader`` now. + You should use ``choices`` or ``choice_loader`` now. **type**: :class:`Symfony\\Component\\Form\\Extension\\Core\\ChoiceList\\ChoiceListInterface`