From 3ea3beb1d5b6e2f2bcabb68b1391348a38ef1259 Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 5 Apr 2018 07:32:53 +0200 Subject: [PATCH] fix deprecations: set 'choices_as_values=true' as a default option of Select2ChoiceType class --- Form/Type/Select2ChoiceType.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Form/Type/Select2ChoiceType.php b/Form/Type/Select2ChoiceType.php index d3fb0bc63..f71638bb3 100644 --- a/Form/Type/Select2ChoiceType.php +++ b/Form/Type/Select2ChoiceType.php @@ -44,7 +44,9 @@ class Select2ChoiceType extends AbstractType public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults( - array('attr' => array('class' => 'select2 ')) - ); + array( + 'attr' => array('class' => 'select2 '), + 'choices_as_values' => true + )); } }