You are browsing the Symfony 4 documentation, which changes significantly from Symfony 3.x. If your app doesn't use Symfony 4 yet, browse the Symfony 3.4 documentation.

How to Dump Workflows

4.0 version
Maintained Unmaintained

How to Dump WorkflowsΒΆ

To help you debug your workflows, you can dump a representation of your workflow with the use of a DumperInterface. Use the GraphvizDumper to create a PNG image of the workflow defined above:

// dump-graph.php
$dumper = new GraphvizDumper();
echo $dumper->dump($definition);
$ php dump-graph.php | dot -Tpng -o graph.png

The result will look like this:


Inside a Symfony application, you can dump the dot file with the workflow:dump command:

$ php bin/console workflow:dump name | dot -Tpng -o graph.png


The dot command is part of Graphviz. You can download it and read more about it on

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.