Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3f197b6

Browse filesBrowse files
committed
moved feature to 4.1
1 parent e250dfa commit 3f197b6
Copy full SHA for 3f197b6

File tree

7 files changed

+62
-69
lines changed
Filter options

7 files changed

+62
-69
lines changed

‎UPGRADE-4.1.md

Copy file name to clipboardExpand all lines: UPGRADE-4.1.md
+34Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,40 @@ EventDispatcher
2727

2828
* The `TraceableEventDispatcherInterface` has been deprecated.
2929

30+
Form
31+
----
32+
33+
* Deprecated the `ChoiceLoaderInterface` implementation in `CountryType`,
34+
`LanguageType`, `LocaleType` and `CurrencyType`, use the `choice_loader`
35+
option instead.
36+
37+
Before:
38+
```php
39+
class MyCountryType extends CountryType
40+
{
41+
public function loadChoiceList()
42+
{
43+
// override the method
44+
}
45+
}
46+
```
47+
48+
After:
49+
```php
50+
class MyCountryType extends AbstractType
51+
{
52+
public function getParent()
53+
{
54+
return CountryType::class;
55+
}
56+
57+
public function configureOptions(OptionsResolver $resolver)
58+
{
59+
$resolver->setDefault('choice_loader', ...); // override the option instead
60+
}
61+
}
62+
```
63+
3064
FrameworkBundle
3165
---------------
3266

‎UPGRADE-4.2.md

Copy file name to clipboardExpand all lines: UPGRADE-4.2.md
-34Lines changed: 0 additions & 34 deletions
This file was deleted.

‎src/Symfony/Component/Form/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/CHANGELOG.md
-7Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
CHANGELOG
22
=========
33

4-
4.2.0
5-
-----
6-
74
* added `choice_translation_locale` option to `CountryType`, `LanguageType`, `LocaleType` and `CurrencyType`
85
* deprecated the `ChoiceLoaderInterface` implementation in `CountryType`, `LanguageType`, `LocaleType` and `CurrencyType`
9-
10-
4.1.0
11-
-----
12-
136
* added `input=datetime_immutable` to DateType, TimeType, DateTimeType
147
* added `rounding_mode` option to MoneyType
158

‎src/Symfony/Component/Form/Extension/Core/Type/CountryType.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/CountryType.php
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class CountryType extends AbstractType implements ChoiceLoaderInterface
3030
*
3131
* @var ArrayChoiceList
3232
*
33-
* @deprecated since Symfony 4.2
33+
* @deprecated since Symfony 4.1
3434
*/
3535
private $choiceList;
3636

@@ -73,11 +73,11 @@ public function getBlockPrefix()
7373
/**
7474
* {@inheritdoc}
7575
*
76-
* @deprecated since Symfony 4.2
76+
* @deprecated since Symfony 4.1
7777
*/
7878
public function loadChoiceList($value = null)
7979
{
80-
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.2, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
80+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
8181

8282
if (null !== $this->choiceList) {
8383
return $this->choiceList;
@@ -89,11 +89,11 @@ public function loadChoiceList($value = null)
8989
/**
9090
* {@inheritdoc}
9191
*
92-
* @deprecated since Symfony 4.2
92+
* @deprecated since Symfony 4.1
9393
*/
9494
public function loadChoicesForValues(array $values, $value = null)
9595
{
96-
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.2, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
96+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
9797

9898
// Optimize
9999
$values = array_filter($values);
@@ -112,11 +112,11 @@ public function loadChoicesForValues(array $values, $value = null)
112112
/**
113113
* {@inheritdoc}
114114
*
115-
* @deprecated since Symfony 4.2
115+
* @deprecated since Symfony 4.1
116116
*/
117117
public function loadValuesForChoices(array $choices, $value = null)
118118
{
119-
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.2, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
119+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
120120

121121
// Optimize
122122
$choices = array_filter($choices);

‎src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class CurrencyType extends AbstractType implements ChoiceLoaderInterface
3030
*
3131
* @var ArrayChoiceList
3232
*
33-
* @deprecated since Symfony 4.2
33+
* @deprecated since Symfony 4.1
3434
*/
3535
private $choiceList;
3636

@@ -73,11 +73,11 @@ public function getBlockPrefix()
7373
/**
7474
* {@inheritdoc}
7575
*
76-
* @deprecated since Symfony 4.2
76+
* @deprecated since Symfony 4.1
7777
*/
7878
public function loadChoiceList($value = null)
7979
{
80-
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.2, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
80+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
8181

8282
if (null !== $this->choiceList) {
8383
return $this->choiceList;
@@ -89,11 +89,11 @@ public function loadChoiceList($value = null)
8989
/**
9090
* {@inheritdoc}
9191
*
92-
* @deprecated since Symfony 4.2
92+
* @deprecated since Symfony 4.1
9393
*/
9494
public function loadChoicesForValues(array $values, $value = null)
9595
{
96-
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.2, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
96+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
9797

9898
// Optimize
9999
$values = array_filter($values);
@@ -112,11 +112,11 @@ public function loadChoicesForValues(array $values, $value = null)
112112
/**
113113
* {@inheritdoc}
114114
*
115-
* @deprecated since Symfony 4.2
115+
* @deprecated since Symfony 4.1
116116
*/
117117
public function loadValuesForChoices(array $choices, $value = null)
118118
{
119-
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.2, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
119+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
120120

121121
// Optimize
122122
$choices = array_filter($choices);

‎src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class LanguageType extends AbstractType implements ChoiceLoaderInterface
3030
*
3131
* @var ArrayChoiceList
3232
*
33-
* @deprecated since Symfony 4.2
33+
* @deprecated since Symfony 4.1
3434
*/
3535
private $choiceList;
3636

@@ -73,11 +73,11 @@ public function getBlockPrefix()
7373
/**
7474
* {@inheritdoc}
7575
*
76-
* @deprecated since Symfony 4.2
76+
* @deprecated since Symfony 4.1
7777
*/
7878
public function loadChoiceList($value = null)
7979
{
80-
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.2, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
80+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
8181

8282
if (null !== $this->choiceList) {
8383
return $this->choiceList;
@@ -89,11 +89,11 @@ public function loadChoiceList($value = null)
8989
/**
9090
* {@inheritdoc}
9191
*
92-
* @deprecated since Symfony 4.2
92+
* @deprecated since Symfony 4.1
9393
*/
9494
public function loadChoicesForValues(array $values, $value = null)
9595
{
96-
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.2, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
96+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
9797

9898
// Optimize
9999
$values = array_filter($values);
@@ -112,11 +112,11 @@ public function loadChoicesForValues(array $values, $value = null)
112112
/**
113113
* {@inheritdoc}
114114
*
115-
* @deprecated since Symfony 4.2
115+
* @deprecated since Symfony 4.1
116116
*/
117117
public function loadValuesForChoices(array $choices, $value = null)
118118
{
119-
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.2, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
119+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
120120

121121
// Optimize
122122
$choices = array_filter($choices);

‎src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class LocaleType extends AbstractType implements ChoiceLoaderInterface
3030
*
3131
* @var ArrayChoiceList
3232
*
33-
* @deprecated since Symfony 4.2
33+
* @deprecated since Symfony 4.1
3434
*/
3535
private $choiceList;
3636

@@ -73,11 +73,11 @@ public function getBlockPrefix()
7373
/**
7474
* {@inheritdoc}
7575
*
76-
* @deprecated since Symfony 4.2
76+
* @deprecated since Symfony 4.1
7777
*/
7878
public function loadChoiceList($value = null)
7979
{
80-
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.2, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
80+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
8181

8282
if (null !== $this->choiceList) {
8383
return $this->choiceList;
@@ -89,11 +89,11 @@ public function loadChoiceList($value = null)
8989
/**
9090
* {@inheritdoc}
9191
*
92-
* @deprecated since Symfony 4.2
92+
* @deprecated since Symfony 4.1
9393
*/
9494
public function loadChoicesForValues(array $values, $value = null)
9595
{
96-
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.2, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
96+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
9797

9898
// Optimize
9999
$values = array_filter($values);
@@ -112,11 +112,11 @@ public function loadChoicesForValues(array $values, $value = null)
112112
/**
113113
* {@inheritdoc}
114114
*
115-
* @deprecated since Symfony 4.2
115+
* @deprecated since Symfony 4.1
116116
*/
117117
public function loadValuesForChoices(array $choices, $value = null)
118118
{
119-
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.2, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
119+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
120120

121121
// Optimize
122122
$choices = array_filter($choices);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.