[Workflow] Fixed BC break
This commit is contained in:
parent
44d43303a9
commit
b24acb0579
@ -40,7 +40,10 @@ class Event extends BaseEvent
|
||||
$this->subject = $subject;
|
||||
$this->marking = $marking;
|
||||
$this->transition = $transition;
|
||||
if (is_string($workflow)) {
|
||||
if (null === $workflow) {
|
||||
@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);
|
||||
$this->workflowName = 'unnamed';
|
||||
} elseif (is_string($workflow)) {
|
||||
@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);
|
||||
$this->workflowName = $workflow;
|
||||
} elseif ($workflow instanceof WorkflowInterface) {
|
||||
|
Reference in New Issue
Block a user