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

Skip to content

Commit 41df3fc

Browse files
committed
[Form] Deprecated TimezoneType::getTimezones()
1 parent da43309 commit 41df3fc

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

UPGRADE-2.8.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ Form
251251
<tag name="form.type_extension" extended-type="Symfony\Component\Form\Extension\Core\Type\TextType" />
252252
</service>
253253
```
254+
255+
* The `TimezoneType::getTimezones()` method was deprecated and will be removed
256+
in Symfony 3.0. You should not use this method.
254257

255258
Translator
256259
----------

UPGRADE-3.0.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ UPGRADE FROM 2.x to 3.0
311311

312312
* The `Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList` class has been removed in
313313
favor of `Symfony\Component\Form\ChoiceList\ArrayChoiceList`.
314+
315+
* The `TimezoneType::getTimezones()` method was removed. You should not use
316+
this method.
314317

315318
### FrameworkBundle
316319

src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,13 @@ public function getBlockPrefix()
6767
* overhead.
6868
*
6969
* @return array The timezone choices
70+
*
71+
* @deprecated Deprecated since version 2.8
7072
*/
7173
public static function getTimezones()
7274
{
75+
@trigger_error('The TimezoneType::getTimezones() method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
76+
7377
if (null === static::$timezones) {
7478
static::$timezones = array();
7579

0 commit comments

Comments
 (0)