Skip to content

Navigation Menu

Sign in
Appearance settings

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 731aefd

Browse filesBrowse files
bug #19260 [Form] Fix depreciation triggers (tgalopin)
This PR was merged into the 3.1 branch. Discussion ---------- [Form] Fix depreciation triggers | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | - | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This adds a missing `E_USER_DEPRECATED` in a `trigger_error`. Commits ------- deb12ae [Form] Fix depreciation triggers
2 parents 80056f7 + deb12ae commit 731aefd
Copy full SHA for 731aefd

File tree

2 files changed

+7
-7
lines changed
Filter options

2 files changed

+7
-7
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php
+1-1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php
+6-6Lines 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+
@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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.