Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2a99121

Browse files
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
2 parents e612b92 + 9aa5507 commit 2a99121

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)