10000 [Workflow] #24501 Add transition blockers. · d-ph/symfony@27be4a2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 27be4a2

Browse files
author
d-ph
committed
[Workflow] symfony#24501 Add transition blockers.
1 parent 83faa63 commit 27be4a2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Symfony/Component/Workflow/Exception/UndefinedTransitionException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
/**
1515
* Thrown by Workflow when an undefined transition is applied on a subject.
1616
*/
17-
class UndefinedTransitionException extends SubjectTransitionException
17+
class UndefinedTransitionException extends LogicException
1818
{
1919
}

src/Symfony/Component/Workflow/Workflow.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ public function apply($subject, $transitionName)
142142

143143
if ($transitionBlockerList->findByCode(TransitionBlocker::REASON_CODE_TRANSITION_NOT_DEFINED)) {
144144
throw new UndefinedTransitionException(
145-
sprintf('Transition "%s" is not defined in workflow "%s".', $transitionName, $this->name),
146-
$transitionBlockerList
145+
sprintf('Transition "%s" is not defined in workflow "%s".', $transitionName, $this->name)
147146
);
148147
}
149148

0 commit comments

Comments
 (0)
0