8000 bug #23865 [Workflow] fixed InvalidDefinitionException message for St… · symfony/symfony@eea78fd · GitHub
[go: up one dir, main page]

Skip to content

Commit eea78fd

Browse files
committed
bug #23865 [Workflow] fixed InvalidDefinitionException message for StateMachineValidator (fmata)
This PR was merged into the 3.3 branch. Discussion ---------- [Workflow] fixed InvalidDefinitionException message for StateMachineValidator | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Little mistake in the exception message which can be lead to difficult debugging if we don't pay attention in the workflow definition. Commits ------- 9c29f9c [Workflow] fixed InvalidDefinitionException message for StateMachineValidator
2 parents 72791d6 + 9c29f9c commit eea78fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Workflow/Validator/StateMachineValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function validate(Definition $definition, $name)
3131
// Make sure that each transition has exactly one FROM
3232
$froms = $transition->getFroms();
3333
if (1 !== count($froms)) {
34-
throw new InvalidDefinitionException(sprintf('A transition in StateMachine can only have one input. But the transition "%s" in StateMachine "%s" has %d inputs.', $transition->getName(), $name, count($transition->getTos())));
34+
throw new InvalidDefinitionException(sprintf('A transition in StateMachine can only have one input. But the transition "%s" in StateMachine "%s" has %d inputs.', $transition->getName(), $name, count($froms)));
3535
}
3636

3737
// Enforcing uniqueness of the names of transitions starting at each node

0 commit comments

Comments
 (0)
0