8000 [Workflow] deprecate `GuardEvent::getContext` method · symfony/symfony@6019e12 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6019e12

Browse files
committed
[Workflow] deprecate GuardEvent::getContext method
1 parent 62e115f commit 6019e12

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Symfony/Component/Workflow/Event/GuardEvent.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ public function __construct(object $subject, Marking $marking, Transition $trans
3232
$this->transitionBlockerList = new TransitionBlockerList();
3333
}
3434

35+
public function getContext(): array
36+
{
37+
@trigger_error(sprintf('The %s::getContext method is deprecated and will throw a \BadMethodCallException exception in next major version. You should not longer call this method as it always returns an empty array when invoked within a guard listener.', __CLASS__), \E_USER_DEPRECATED);
38+
39+
return parent::getContext();
40+
}
41+
3542
public function getTransition(): Transition
3643
{
3744
return parent::getTransition();

0 commit comments

Comments
 (0)
0