diff --git a/src/Symfony/Component/Form/CHANGELOG.md b/src/Symfony/Component/Form/CHANGELOG.md index b28d44740d..f6912fa3b8 100644 --- a/src/Symfony/Component/Form/CHANGELOG.md +++ b/src/Symfony/Component/Form/CHANGELOG.md @@ -18,6 +18,7 @@ CHANGELOG * removed passing a `ValueExporter` instance to the `FormDataExtractor::__construct()` method * removed passing guesser services ids as the fourth argument of `DependencyInjectionExtension::__construct()` * removed the ability to validate an unsubmitted form. + * removed `ChoiceLoaderInterface` implementation in `TimezoneType` 3.4.0 ----- diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php b/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php index 1ba5a13604..3f1a223d37 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php @@ -12,27 +12,14 @@ namespace Symfony\Component\Form\Extension\Core\Type; use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ChoiceList\ArrayChoiceList; use Symfony\Component\Form\ChoiceList\Loader\CallbackChoiceLoader; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeZoneToStringTransformer; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; -class TimezoneType extends AbstractType implements ChoiceLoaderInterface +class TimezoneType extends AbstractType { - /** - * Timezone loaded choice list. - * - * The choices are generated from the ICU function \DateTimeZone::listIdentifiers(). - * - * @var ArrayChoiceList - * - * @deprecated since version 3.4, to be removed in 4.0 - */ - private $choiceList; - /** * {@inheritdoc} */ @@ -82,68 +69,6 @@ class TimezoneType extends AbstractType implements ChoiceLoaderInterface return 'timezone'; } - /** - * {@inheritdoc} - * - * @deprecated since version 3.4, to be removed in 4.0 - */ - public function loadChoiceList($value = null) - { - @trigger_error(sprintf('Method "%s" is deprecated since version 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED); - - if (null !== $this->choiceList) { - return $this->choiceList; - } - - return $this->choiceList = new ArrayChoiceList(self::getTimezones(\DateTimeZone::ALL), $value); - } - - /** - * {@inheritdoc} - * - * @deprecated since version 3.4, to be removed in 4.0 - */ - public function loadChoicesForValues(array $values, $value = null) - { - @trigger_error(sprintf('Method "%s" is deprecated since version 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED); - - // Optimize - $values = array_filter($values); - if (empty($values)) { - return array(); - } - - // If no callable is set, values are the same as choices - if (null === $value) { - return $values; - } - - return $this->loadChoiceList($value)->getChoicesForValues($values); - } - - /** - * {@inheritdoc} - * - * @deprecated since version 3.4, to be removed in 4.0 - */ - public function loadValuesForChoices(array $choices, $value = null) - { - @trigger_error(sprintf('Method "%s" is deprecated since version 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED); - - // Optimize - $choices = array_filter($choices); - if (empty($choices)) { - return array(); - } - - // If no callable is set, choices are the same as values - if (null === $value) { - return $choices; - } - - return $this->loadChoiceList($value)->getValuesForChoices($choices); - } - /** * Returns a normalized array of timezone choices. *