Skip to content

sourceability/doctrine-extra-bundle

This branch is up to date with magikid/doctrine-extra-bundle:master.

Folders and files

NameName
Last commit message
Last commit date
Apr 28, 2020
Dec 28, 2017
Apr 28, 2020
Apr 28, 2020
Apr 28, 2020
Jul 11, 2016
Apr 28, 2020
Oct 16, 2013
Jul 16, 2016
Jul 11, 2016
Oct 16, 2013
Jul 16, 2016
Apr 28, 2020
Jul 16, 2016
Apr 28, 2020

Repository files navigation

DoctrineExtraBundle

Build status Latest Stable Version Total Downloads License Monthly Downloads Daily Downloads

Graph tool for Doctrine. Relies on Graphviz.

Demo

Installation

Install the latest version with

composer require --dev alexandresalome/doctrine-extra-bundle

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.
            $bundles[] = new Alex\DoctrineExtraBundle\AlexDoctrineExtraBundle();
        }


        // ...
    }

    // ...
}

Usage

Dump entity manager schema as graph

php app/console doctrine:mapping:graphviz

If you want to create a PDF file out of it, with Linux:

.. code-block:: bash

php app/console doctrine:mapping:graphviz | dot -Tpdf -oout.pdf
xdg-open out.pdf

Development

Generate sample graphs

A set of sample entities are available to test internally the schema generations. You can generate the graph for any of the samples (located in Tests/Fixtures) by running:

./Resources/bin/graph Simple | dot -Tpdf -oout.pdf
xdg-open out.pdf

About

Graph features for Doctrine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%