Skip to content

Commit 6665283

Browse files
committed
Merge branch '3.3' into 3.4
* 3.3: fixed some deprecation messages fixed some deprecation messages fixed some deprecation messages fixed some deprecation messages [2.7][DX] Use constant message contextualisation for deprecations
2 parents a0c9832 + 20e5613 commit 6665283

File tree

10 files changed

+21
-21
lines changed

10 files changed

+21
-21
lines changed

ChoiceList/Factory/PropertyAccessDecorator.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function createListFromChoices($choices, $value = null)
7474
if (is_string($value) && !is_callable($value)) {
7575
$value = new PropertyPath($value);
7676
} elseif (is_string($value) && is_callable($value)) {
77-
@trigger_error('Passing callable strings is deprecated since version 3.1 and PropertyAccessDecorator will treat them as property paths in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
77+
@trigger_error('Passing callable strings is deprecated since Symfony 3.1 and PropertyAccessDecorator will treat them as property paths in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
7878
}
7979

8080
if ($value instanceof PropertyPath) {
@@ -107,7 +107,7 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, $value = nul
107107
if (is_string($value) && !is_callable($value)) {
108108
$value = new PropertyPath($value);
109109
} elseif (is_string($value) && is_callable($value)) {
110-
@trigger_error('Passing callable strings is deprecated since version 3.1 and PropertyAccessDecorator will treat them as property paths in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
110+
@trigger_error('Passing callable strings is deprecated since Symfony 3.1 and PropertyAccessDecorator will treat them as property paths in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
111111
}
112112

113113
if ($value instanceof PropertyPath) {
@@ -145,7 +145,7 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
145145
if (is_string($label) && !is_callable($label)) {
146146
$label = new PropertyPath($label);
147147
} elseif (is_string($label) && is_callable($label)) {
148-
@trigger_error('Passing callable strings is deprecated since version 3.1 and PropertyAccessDecorator will treat them as property paths in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
148+
@trigger_error('Passing callable strings is deprecated since Symfony 3.1 and PropertyAccessDecorator will treat them as property paths in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
149149
}
150150

151151
if ($label instanceof PropertyPath) {
@@ -157,7 +157,7 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
157157
if (is_string($preferredChoices) && !is_callable($preferredChoices)) {
158158
$preferredChoices = new PropertyPath($preferredChoices);
159159
} elseif (is_string($preferredChoices) && is_callable($preferredChoices)) {
160-
@trigger_error('Passing callable strings is deprecated since version 3.1 and PropertyAccessDecorator will treat them as property paths in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
160+
@trigger_error('Passing callable strings is deprecated since Symfony 3.1 and PropertyAccessDecorator will treat them as property paths in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
161161
}
162162

163163
if ($preferredChoices instanceof PropertyPath) {
@@ -174,7 +174,7 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
174174
if (is_string($index) && !is_callable($index)) {
175175
$index = new PropertyPath($index);
176176
} elseif (is_string($index) && is_callable($index)) {
177-
@trigger_error('Passing callable strings is deprecated since version 3.1 and PropertyAccessDecorator will treat them as property paths in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
177+
@trigger_error('Passing callable strings is deprecated since Symfony 3.1 and PropertyAccessDecorator will treat them as property paths in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
178178
}
179179

180180
if ($index instanceof PropertyPath) {
@@ -186,7 +186,7 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
186186
if (is_string($groupBy) && !is_callable($groupBy)) {
187187
$groupBy = new PropertyPath($groupBy);
188188
} elseif (is_string($groupBy) && is_callable($groupBy)) {
189-
@trigger_error('Passing callable strings is deprecated since version 3.1 and PropertyAccessDecorator will treat them as property paths in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
189+
@trigger_error('Passing callable strings is deprecated since Symfony 3.1 and PropertyAccessDecorator will treat them as property paths in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
190190
}
191191

192192
if ($groupBy instanceof PropertyPath) {
@@ -202,7 +202,7 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
202202
if (is_string($attr) && !is_callable($attr)) {
203203
$attr = new PropertyPath($attr);
204204
} elseif (is_string($attr) && is_callable($attr)) {
205-
@trigger_error('Passing callable strings is deprecated since version 3.1 and PropertyAccessDecorator will treat them as property paths in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
205+
@trigger_error('Passing callable strings is deprecated since Symfony 3.1 and PropertyAccessDecorator will treat them as property paths in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
206206
}
207207

208208
if ($attr instanceof PropertyPath) {

ChoiceList/LazyChoiceList.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function getChoices()
7777
// We can safely invoke the {@link ChoiceLoaderInterface} assuming it has the list
7878
// in cache when the lazy list is already loaded
7979
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
80-
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
80+
@trigger_error(sprintf('Caching the choice list in %s is deprecated since Symfony 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
8181
}
8282

8383
return $this->loadedList->getChoices();
@@ -100,7 +100,7 @@ public function getValues()
100100
if ($this->loaded) {
101101
// Check whether the loader has the same cache
102102
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
103-
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
103+
@trigger_error(sprintf('Caching the choice list in %s is deprecated since Symfony 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
104104
}
105105

106106
return $this->loadedList->getValues();
@@ -123,7 +123,7 @@ public function getStructuredValues()
123123
if ($this->loaded) {
124124
// Check whether the loader has the same cache
125125
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
126-
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
126+
@trigger_error(sprintf('Caching the choice list in %s is deprecated since Symfony 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
127127
}
128128

129129
return $this->loadedList->getStructuredValues();
@@ -146,7 +146,7 @@ public function getOriginalKeys()
146146
if ($this->loaded) {
147147
// Check whether the loader has the same cache
148148
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
149-
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
149+
@trigger_error(sprintf('Caching the choice list in %s is deprecated since Symfony 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
150150
}
151151

152152
return $this->loadedList->getOriginalKeys();
@@ -169,7 +169,7 @@ public function getChoicesForValues(array $values)
169169
if ($this->loaded) {
170170
// Check whether the loader has the same cache
171171
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
172-
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
172+
@trigger_error(sprintf('Caching the choice list in %s is deprecated since Symfony 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
173173
}
174174

175175
return $this->loadedList->getChoicesForValues($values);
@@ -186,7 +186,7 @@ public function getValuesForChoices(array $choices)
186186
if ($this->loaded) {
187187
// Check whether the loader has the same cache
188188
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
189-
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
189+
@trigger_error(sprintf('Caching the choice list in %s is deprecated since Symfony 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
190190
}
191191

192192
return $this->loadedList->getValuesForChoices($choices);

Extension/Core/EventListener/ResizeFormListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function preSubmit(FormEvent $event)
8989
$data = $event->getData();
9090

9191
if ($data instanceof \Traversable && $data instanceof \ArrayAccess) {
92-
@trigger_error('Support for objects implementing both \Traversable and \ArrayAccess is deprecated since version 3.1 and will be removed in 4.0. Use an array instead.', E_USER_DEPRECATED);
92+
@trigger_error('Support for objects implementing both \Traversable and \ArrayAccess is deprecated since Symfony 3.1 and will be removed in 4.0. Use an array instead.', E_USER_DEPRECATED);
9393
}
9494

9595
if (!is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) {

Extension/Core/Type/ChoiceType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public function configureOptions(OptionsResolver $resolver)
280280
throw new \RuntimeException(sprintf('The "choices_as_values" option of the %s should not be used. Remove it and flip the contents of the "choices" option instead.', get_class($this)));
281281
}
282282

283-
@trigger_error('The "choices_as_values" option is deprecated since version 3.1 and will be removed in 4.0. You should not use it anymore.', E_USER_DEPRECATED);
283+
@trigger_error('The "choices_as_values" option is deprecated since Symfony 3.1 and will be removed in 4.0. You should not use it anymore.', E_USER_DEPRECATED);
284284

285285
return true;
286286
};

Extension/Core/Type/CountryType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function configureOptions(OptionsResolver $resolver)
3939
$resolver->setDefaults(array(
4040
'choice_loader' => function (Options $options) {
4141
if ($options['choices']) {
42-
@trigger_error(sprintf('Using the "choices" option in %s has been deprecated since version 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED);
42+
@trigger_error(sprintf('Using the "choices" option in %s has been deprecated since Symfony 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED);
4343

4444
return null;
4545
}

Extension/Core/Type/CurrencyType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function configureOptions(OptionsResolver $resolver)
3939
$resolver->setDefaults(array(
4040
'choice_loader' => function (Options $options) {
4141
if ($options['choices']) {
42-
@trigger_error(sprintf('Using the "choices" option in %s has been deprecated since version 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED);
42+
@trigger_error(sprintf('Using the "choices" option in %s has been deprecated since Symfony 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED);
4343

4444
return null;
4545
}

Extension/Core/Type/LanguageType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function configureOptions(OptionsResolver $resolver)
3939
$resolver->setDefaults(array(
4040
'choice_loader' => function (Options $options) {
4141
if ($options['choices']) {
42-
@trigger_error(sprintf('Using the "choices" option in %s has been deprecated since version 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED);
42+
@trigger_error(sprintf('Using the "choices" option in %s has been deprecated since Symfony 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED);
4343

4444
return null;
4545
}

Extension/Core/Type/LocaleType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function configureOptions(OptionsResolver $resolver)
3939
$resolver->setDefaults(array(
4040
'choice_loader' => function (Options $options) {
4141
if ($options['choices']) {
42-
@trigger_error(sprintf('Using the "choices" option in %s has been deprecated since version 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED);
42+
@trigger_error(sprintf('Using the "choices" option in %s has been deprecated since Symfony 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED);
4343

4444
return null;
4545
}

Extension/Core/Type/TimezoneType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function configureOptions(OptionsResolver $resolver)
5151
$resolver->setDefaults(array(
5252
'choice_loader' => function (Options $options) {
5353
if ($options['choices']) {
54-
@trigger_error(sprintf('Using the "choices" option in %s has been deprecated since version 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED);
54+
@trigger_error(sprintf('Using the "choices" option in %s has been deprecated since Symfony 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED);
5555

5656
return null;
5757
}

Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ public function isEmpty()
734734
public function isValid()
735735
{
736736
if (!$this->submitted) {
737-
@trigger_error('Call Form::isValid() with an unsubmitted form is deprecated since version 3.2 and will throw an exception in 4.0. Use Form::isSubmitted() before Form::isValid() instead.', E_USER_DEPRECATED);
737+
@trigger_error('Call Form::isValid() with an unsubmitted form is deprecated since Symfony 3.2 and will throw an exception in 4.0. Use Form::isSubmitted() before Form::isValid() instead.', E_USER_DEPRECATED);
738738

739739
return false;
740740
}

0 commit comments

Comments
 (0)