You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #16994 [Form] Deprecate the "choices_as_values" option of ChoiceType (nicolas-grekas)
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Form] Deprecate the "choices_as_values" option of ChoiceType
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
9aa5507 [Form] Deprecate the "choices_as_values" option of ChoiceType
Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -264,8 +264,7 @@ public function configureOptions(OptionsResolver $resolver)
264
264
thrownew \RuntimeException('The "choices_as_values" option should not be used. Remove it and flip the contents of the "choices" option instead.');
265
265
}
266
266
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);
269
268
270
269
returntrue;
271
270
};
@@ -302,7 +301,7 @@ public function configureOptions(OptionsResolver $resolver)
302
301
'multiple' => false,
303
302
'expanded' => false,
304
303
'choices' => array(),
305
-
'choices_as_values' => null, // to be deprecated in 3.1
304
+
'choices_as_values' => null, // deprecated since 3.1
0 commit comments