Skip to content

Commit 20ae1c8

Browse files
author
Iltar van der Berg
committed
Definition deprecation notice includes the parameters given
1 parent 9d373af commit 20ae1c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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)