Warning: You are browsing the documentation for Symfony 4.0, which is no longer maintained.
Read the updated version of this page for Symfony 5.3 (the current stable version).
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 or SVG image of the workflow defined above:
1 2 3
// dump-graph.php $dumper = new GraphvizDumper(); echo $dumper->dump($definition);
1 2 3 4
$ php dump-graph.php | dot -Tsvg -o graph.svg # run this command if you prefer PNG images: # $ 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
$ php bin/console workflow:dump name | dot -Tsvg -o graph.svg
dot command is part of Graphviz. You can download it and read
more about it on Graphviz.org.