Skip to content

Commit 19a36a0

Browse files
committed
improve deprecation messages
1 parent 7fd6396 commit 19a36a0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Event/Event.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct($subject, Marking $marking, Transition $transition,
4444
@trigger_error(sprintf('Passing only three parameters to "%s" is deprecated since Symfony 4.1. Pass a %s instance as fourth parameter instead.', __METHOD__, WorkflowInterface::class), E_USER_DEPRECATED);
4545
$this->workflowName = 'unnamed';
4646
} elseif (is_string($workflow)) {
47-
@trigger_error(sprintf('Passing a string as 4th parameter of "%s" is deprecated since Symfony 4.1. Pass a %s instance instead.', __METHOD__, WorkflowInterface::class), E_USER_DEPRECATED);
47+
@trigger_error(sprintf('Passing a string as the 4th parameter of "%s()" is deprecated since Symfony 4.1. Pass a %s instance instead.', __METHOD__, WorkflowInterface::class), E_USER_DEPRECATED);
4848
$this->workflowName = $workflow;
4949
} elseif ($workflow instanceof WorkflowInterface) {
5050
$this->workflow = $workflow;

Registry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Registry
3131
*/
3232
public function add(Workflow $workflow, $supportStrategy)
3333
{
34-
@trigger_error(sprintf('%s is deprecated since Symfony 4.1. Use addWorkflow() instead.', __METHOD__), E_USER_DEPRECATED);
34+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1. Use addWorkflow() instead.', __METHOD__), E_USER_DEPRECATED);
3535
$this->workflows[] = array($workflow, $supportStrategy);
3636
}
3737

Tests/RegistryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected function tearDown()
3131

3232
/**
3333
* @group legacy
34-
* @expectedDeprecation Symfony\Component\Workflow\Registry::add is deprecated since Symfony 4.1. Use addWorkflow() instead.
34+
* @expectedDeprecation The "Symfony\Component\Workflow\Registry::add()" method is deprecated since Symfony 4.1. Use addWorkflow() instead.
3535
*/
3636
public function testAddIsDeprecated()
3737
{

0 commit comments

Comments
 (0)