Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3e7b19e

Browse files
committed
minor #14720 [2.7][DI] Definition deprecation notice includes the parameters given (iltar)
This PR was merged into the 2.7 branch. Discussion ---------- [2.7][DI] Definition deprecation notice includes the parameters given | Q | A | ------------- | --- | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #14687 | License | MIT This PR won't fix the issue at hand, but should make it a bit easier to debug. Because this is used by the configuration loader, it's hard to trace back where and how it's actually used. Commits ------- b322d46 Definition deprecation notice includes the parameters given
2 parents 3331f0a + b322d46 commit 3e7b19e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/DependencyInjection/Definition.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function getFactory()
9898
*/
9999
public function setFactoryClass($factoryClass)
100100
{
101-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', E_USER_DEPRECATED);
101+
trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryClass), E_USER_DEPRECATED);
102102

103103
$this->factoryClass = $factoryClass;
104104

@@ -134,7 +134,7 @@ public function getFactoryClass($triggerDeprecationError = true)
134134
*/
135135
public function setFactoryMethod($factoryMethod)
136136
{
137-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', E_USER_DEPRECATED);
137+
trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryMethod), E_USER_DEPRECATED);
138138

139139
$this->factoryMethod = $factoryMethod;
140140

@@ -205,7 +205,7 @@ public function getFactoryMethod($triggerDeprecationError = true)
205205
*/
206206
public function setFactoryService($factoryService)
207207
{
208-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', E_USER_DEPRECATED);
208+
trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryService), E_USER_DEPRECATED);
209209

210210
$this->factoryService = $factoryService;
211211

0 commit comments

Comments
 (0)