Skip to content

Commit ec2f4f1

Browse files
lyrixxfabpot
authored andcommitted
[Workflow] Fixed graphviz dumper for state machine
1 parent 92c65d7 commit ec2f4f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Command/WorkflowDumpCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\Console\Input\InputInterface;
1616
use Symfony\Component\Console\Output\OutputInterface;
1717
use Symfony\Component\Workflow\Dumper\GraphvizDumper;
18+
use Symfony\Component\Workflow\Dumper\StateMachineGraphvizDumper;
1819
use Symfony\Component\Workflow\Marking;
1920
use Symfony\Component\Workflow\Workflow;
2021

@@ -60,13 +61,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
6061
$serviceId = $input->getArgument('name');
6162
if ($container->has('workflow.'.$serviceId)) {
6263
$workflow = $container->get('workflow.'.$serviceId);
64+
$dumper = new GraphvizDumper();
6365
} elseif ($container->has('state_machine.'.$serviceId)) {
6466
$workflow = $container->get('state_machine.'.$serviceId);
67+
$dumper = new StateMachineGraphvizDumper();
6568
} else {
6669
throw new \InvalidArgumentException(sprintf('No service found for "workflow.%1$s" nor "state_machine.%1$s".', $serviceId));
6770
}
6871

69-
$dumper = new GraphvizDumper();
7072
$marking = new Marking();
7173

7274
foreach ($input->getArgument('marking') as $place) {

0 commit comments

Comments
 (0)