From de3099ba598d24771beb420ff17434f45625da16 Mon Sep 17 00:00:00 2001 From: Maxime Veber Date: Thu, 1 Aug 2019 15:24:11 +0200 Subject: [PATCH] Removed useless bc layer for Sf <2.6 Current minimal supported version is Sf 2.7. We can remove this code safely. --- Form/Type/PhoneNumberType.php | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/Form/Type/PhoneNumberType.php b/Form/Type/PhoneNumberType.php index d7990979..ffdf4489 100644 --- a/Form/Type/PhoneNumberType.php +++ b/Form/Type/PhoneNumberType.php @@ -154,25 +154,13 @@ public function configureOptions(OptionsResolver $resolver) ) ); - if (method_exists($resolver, 'setDefault')) { - $resolver->setAllowedValues( - 'widget', - array( - self::WIDGET_SINGLE_TEXT, - self::WIDGET_COUNTRY_CHOICE, - ) - ); - } else { - // To be removed when dependency on Symfony OptionsResolver is bumped to 2.6. - $resolver->setAllowedValues( - array( - 'widget' => array( - self::WIDGET_SINGLE_TEXT, - self::WIDGET_COUNTRY_CHOICE, - ), - ) - ); - } + $resolver->setAllowedValues( + 'widget', + array( + self::WIDGET_SINGLE_TEXT, + self::WIDGET_COUNTRY_CHOICE, + ) + ); } /**