From 41df3fce32a8bd489fba2e562645deed1f4e5860 Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Thu, 26 Nov 2015 18:08:26 +0100 Subject: [PATCH] [Form] Deprecated TimezoneType::getTimezones() --- UPGRADE-2.8.md | 3 +++ UPGRADE-3.0.md | 3 +++ .../Component/Form/Extension/Core/Type/TimezoneType.php | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/UPGRADE-2.8.md b/UPGRADE-2.8.md index 67e1c0e66f..216f1844e7 100644 --- a/UPGRADE-2.8.md +++ b/UPGRADE-2.8.md @@ -251,6 +251,9 @@ Form ``` + + * The `TimezoneType::getTimezones()` method was deprecated and will be removed + in Symfony 3.0. You should not use this method. Translator ---------- diff --git a/UPGRADE-3.0.md b/UPGRADE-3.0.md index 5b86950fc6..d422af0a58 100644 --- a/UPGRADE-3.0.md +++ b/UPGRADE-3.0.md @@ -311,6 +311,9 @@ UPGRADE FROM 2.x to 3.0 * The `Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList` class has been removed in favor of `Symfony\Component\Form\ChoiceList\ArrayChoiceList`. + + * The `TimezoneType::getTimezones()` method was removed. You should not use + this method. ### FrameworkBundle diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php b/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php index 3277a18386..5e3f4a385a 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php @@ -67,9 +67,13 @@ class TimezoneType extends AbstractType * overhead. * * @return array The timezone choices + * + * @deprecated Deprecated since version 2.8 */ public static function getTimezones() { + @trigger_error('The TimezoneType::getTimezones() method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED); + if (null === static::$timezones) { static::$timezones = array();