Cover of the book Symfony 5: The Fast Track

Symfony 5: The Fast Track is the best book to learn modern Symfony development, from zero to production. +300 pages showcasing Symfony with Docker, APIs, queues & async tasks, Webpack, SPAs, etc.


You are browsing the documentation for Symfony 4.0 which is not maintained anymore.

Consider upgrading your projects to Symfony 5.2.

How to Dump Workflows

4.0 version

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 or SVG image of the workflow defined above:

// dump-graph.php
$dumper = new GraphvizDumper();
echo $dumper->dump($definition);
$ 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 workflow:dump command:

$ php bin/console workflow:dump name | dot -Tsvg -o graph.svg


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.