Skip to content

Render a graphical representation of a Doctrine2 mapped database.

License

Notifications You must be signed in to change notification settings

janalis/doctrineviz

Repository files navigation

doctrineviz

Build Status Coverage Status SensioLabs Insight Scrutinizer Code Quality Style CI

Render a graphical representation of a Doctrine2 mapped database.

Example

Example

Installation

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).

Mac OS

$ brew install graphviz

Ubuntu

$ sudo apt install -y graphviz

Windows

Windows users may download GraphViZ for Windows.

Usage

Into your symfony project:

$ php app/console doctrine:generate:viz --help

Credits