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 https://github.com/symfony/symfony/pull/16681. It needs to be deprecated before we can remove it since it is public.

Commits
-------

41df3fc [Form] Deprecated TimezoneType::getTimezones()
This commit is contained in:
Fabien Potencier 2015-11-27 10:01:47 +01:00
commit 6dacdc4ebd
3 changed files with 10 additions and 0 deletions

View File

@ -251,6 +251,9 @@ Form
<tag name="form.type_extension" extended-type="Symfony\Component\Form\Extension\Core\Type\TextType" />
</service>
```
* The `TimezoneType::getTimezones()` method was deprecated and will be removed
in Symfony 3.0. You should not use this method.
Translator
----------

View File

@ -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

View File

@ -75,9 +75,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();