8000 [Form] Fix depreciation triggers · symfony/symfony@deb12ae · GitHub
[go: up one dir, main page]

Skip to content

Commit deb12ae

Browse files
committed
[Form] Fix depreciation triggers
1 parent 80056f7 commit deb12ae

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function __construct($manager, $class, $idReader = null, $objectLoader =
6969
{
7070
// BC to be removed and replace with type hints in 4.0
7171
if ($manager instanceof ChoiceListFactoryInterface) {
72-
@trigger_error(sprintf('Passing a ChoiceListFactoryInterface to %s is deprecated since version 3.1 and will no longer be supported in 4.0. You should either call "%s::loadChoiceList" or override it to return a ChoiceListInterface.', __CLASS__, __CLASS__));
72+
@trigger_error(sprintf('Passing a ChoiceListFactoryInterface to %s is deprecated since version 3.1 and will no longer be supported in 4.0. You should either call "%s::loadChoiceList" or override it to return a ChoiceListInterface.', __CLASS__, __CLASS__), E_USER_DEPRECATED);
7373

7474
// Provide a BC layer since $factory has changed
7575
// form first to last argument as of 3.1

src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function getChoices()
8383
// We can safely invoke the {@link ChoiceLoaderInterface} assuming it has the list
8484
// in cache when the lazy list is already loaded
8585
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
86-
@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));
86+
@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);
8787
}
8888

8989
return $this->loadedList->getChoices();
@@ -106,7 +106,7 @@ public function getValues()
106106
if ($this->loaded) {
107107
// Check whether the loader has the same cache
108108
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
109-
@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));
109+
@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);
110110
}
111111

112112
return $this->loadedList->getValues();
@@ -129,7 +129,7 @@ public function getStructuredValues()
129129
if ($this->loaded) {
130130
// Check whether the loader has the same cache
131131
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
132-
@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));
132+
10B2B @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);
133133
}
134134

135135
return $this->loadedList->getStructuredValues();
@@ -152,7 +152,7 @@ public function getOriginalKeys()
152152
if ($this->loaded) {
153153
// Check whether the loader has the same cache
154154
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
155-
@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));
155+
@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);
156156
}
157157

158158
return $this->loadedList->getOriginalKeys();
@@ -175,7 +175,7 @@ public function getChoicesForValues(array $values)
175175
if ($this->loaded) {
176176
// Check whether the loader has the same cache
177177
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
178-
@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));
178+
@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);
179179
}
180180

181181
return $this->loadedList->getChoicesForValues($values);
@@ -192,7 +192,7 @@ public function getValuesForChoices(array $choices)
192192
if ($this->loaded) {
193193
// Check whether the loader has the same cache
194194
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
195-
@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));
195+
@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);
196196
}
197197

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

0 commit comments

Comments
 (0)
0