8000 [Form] Deprecate the "choices_as_values" option of ChoiceType · symfony/symfony@9aa5507 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9aa5507

Browse files
[Form] Deprecate the "choices_as_values" option of ChoiceType
1 parent 45e26ca commit 9aa5507

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/Symfony/Component/Form/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
3.1.0
5+
-----
6+
7+
* deprecated the "choices_as_values" option of ChoiceType
8+
49
3.0.0
510
-----
611

src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,7 @@ public function configureOptions(OptionsResolver $resolver)
264264
throw new \RuntimeException('The "choices_as_values" option should not be used. Remove it and flip the contents of the "choices" option instead.');
265265
}
266266

267-
// To be uncommented in 3.1
268-
//@trigger_error('The "choices_as_values" option is deprecated since version 3.1 and will be removed in 4.0. You should not use it anymore.', E_USER_DEPRECATED);
267+
@trigger_error('The "choices_as_values" option is deprecated since version 3.1 and will be removed in 4.0. You should not use it anymore.', E_USER_DEPRECATED);
269268

270269
return true;
271270
};
@@ -302,7 +301,7 @@ public function configureOptions(OptionsResolver $resolver)
302301
'multiple' => false,
303302
'expanded' => false,
304303
'choices' => array(),
305-
'choices_as_values' => null, // to be deprecated in 3.1
304+
'choices_as_values' => null, // deprecated since 3.1
306305
'choice_loader' => null,
307306
'choice_label' => null,
308307
'choice_name' => null,

0 commit comments

Comments
 (0)
0