Skip to content

Commit 6dacdc4

Browse files
committed
feature #16687 [Form] Deprecated TimezoneType::getTimezones() (webmozart)
This PR was merged into the 2.8 branch. Discussion ---------- [Form] Deprecated TimezoneType::getTimezones() | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This method is useless as of #16681. It needs to be deprecated before we can remove it since it is public. Commits ------- 41df3fc [Form] Deprecated TimezoneType::getTimezones()
2 parents ab5efa7 + 41df3fc commit 6dacdc4

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
@@ -75,9 +75,13 @@ public function getBlockPrefix()
7575
* overhead.
7676
*
7777
* @return array The timezone choices
78+
*
79+
* @deprecated Deprecated since version 2.8
7880
*/
7981
public static function getTimezones()
8082
{
83+
@trigger_error('The TimezoneType::getTimezones() method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
84+
8185
if (null === static::$timezones) {
8286
static::$timezones = array();
8387

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy