Render a graphical representation of a Doctrine2 mapped database.
Require package through composer:
$ composer require --dev janalis/doctrineviz
Then, enable the bundle by adding the following line in the app/AppKernel.php
file of your project:
// app/AppKernel.php
class AppKernel extends Kernel
{
public function registerBundles()
{
//...
if (in_array($this->getEnvironment(), ['dev', 'test'])) {
// ...
// Because the vendor code could be not present, you should check if the bundle is here before using it.
new Janalis\Doctrineviz\DoctrinevizBundle(),
}
// ...
}
// ...
}
In order to be able to use the graph drawing feature you'll have to install GraphViz (dot executable).
$ brew install graphviz
$ sudo apt install -y graphviz
Windows users may download GraphViZ for Windows.
Into your symfony project:
$ php app/console doctrine:generate:viz --help