PHPackages                             nepoh/doctrine-yuml-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. nepoh/doctrine-yuml-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

nepoh/doctrine-yuml-bundle
==========================

Symfony Bundle to visualize the mapping of your entities with Yuml

1.1.6(7y ago)09MITPHPPHP &gt;=7.1.3

Since Mar 6Pushed 4y agoCompare

[ Source](https://github.com/Nepoh/doctrine-yuml-bundle)[ Packagist](https://packagist.org/packages/nepoh/doctrine-yuml-bundle)[ RSS](/packages/nepoh-doctrine-yuml-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (15)Versions (16)Used By (0)

doctrine-yuml-bundle
====================

[](#doctrine-yuml-bundle)

[![Build Status](https://camo.githubusercontent.com/eefc97ea28f3374c7ee3e44361ee0de75fa7e0fe0481d89434fd666baef59844/68747470733a2f2f7472617669732d63692e6f72672f4e6f6e6f313937312f646f637472696e652d79756d6c2d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Nono1971/doctrine-yuml-bundle)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/50aecdf615c61a6a58fc38dd3e06500b9ea77b29875cde00edddf9fcd5fc4fde/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4e6f6e6f313937312f646f637472696e652d79756d6c2d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Nono1971/doctrine-yuml-bundle/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/61c6d17fa9bda1efb60d80b09ed65e27a3312cb142c06afcef49e146790959d3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4e6f6e6f313937312f646f637472696e652d79756d6c2d62756e646c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Nono1971/doctrine-yuml-bundle/?branch=master)[![Build Status](https://camo.githubusercontent.com/57e9693895dad6937b2d71ec0bdf87f6ca9f5ff7443ae908804c1b59b5669585/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4e6f6e6f313937312f646f637472696e652d79756d6c2d62756e646c652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Nono1971/doctrine-yuml-bundle/build-status/master)[![License](https://camo.githubusercontent.com/52d0e864a1d19ce6d273f1960f20d0bf1607d9fcedc06a736cdd0c0583095d73/68747470733a2f2f706f7365722e707567782e6f72672f6f6e7572622f646f637472696e652d79756d6c2d62756e646c652f6c6963656e7365)](https://packagist.org/packages/onurb/doctrine-yuml-bundle)[![Latest Stable Version](https://camo.githubusercontent.com/8b4bca0fbf4d4ba41d6f2fb15e4813ca35aef9cad842c484e0577cdf1767fff1/68747470733a2f2f706f7365722e707567782e6f72672f6f6e7572622f646f637472696e652d79756d6c2d62756e646c652f762f737461626c65)](https://packagist.org/packages/onurb/doctrine-yuml-bundle)[![Total Downloads](https://camo.githubusercontent.com/5f322918ed3028f3ad0dfb030acfd547d4595643bebcd3f038ffdc5190846624/68747470733a2f2f706f7365722e707567782e6f72672f6f6e7572622f646f637472696e652d79756d6c2d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/onurb/doctrine-yuml-bundle)[![Monthly Downloads](https://camo.githubusercontent.com/ee5bd7bcca482dc8e017d5f97116df0279f37dbc45276fe22293c5763fa34bed/68747470733a2f2f706f7365722e707567782e6f72672f6f6e7572622f646f637472696e652d79756d6c2d62756e646c652f642f6d6f6e74686c79)](https://packagist.org/packages/onurb/doctrine-yuml-bundle)[![Daily Downloads](https://camo.githubusercontent.com/73e0bd6460663002d5c1f8619a163d20d7d8d54cdccc532ea1721f7418b0f313/68747470733a2f2f706f7365722e707567782e6f72672f6f6e7572622f646f637472696e652d79756d6c2d62756e646c652f642f6461696c79)](https://packagist.org/packages/onurb/doctrine-yuml-bundle)

Bundle to visualise doctrine entities graph with yuml in Symfony4

This bundle is based on Marco Pivetta's work for zend doctrine ORM Module and zend developper tools

It uses the yuml.me api to display your project's objects mapping.

Installation
------------

[](#installation)

### Symfony 4

[](#symfony-4)

Run the `composer require onurb/doctrine-yuml-bundle` command in your console

Adjust your parameters to personalize the render in config/packages/dev/yuml.yaml, or use annotations as describe bellow

Adjust the route (if you want to add a prefix) in config/routes/dev/yuml.yaml

### Symfony 3

[](#symfony-3)

symfony 3 is not supported since 1.1.6, if you didn't migrate to SF4 yet, use version 1.1.5

- Add this bundle to your project as a composer dependency:

```
    // composer.json
    {
        // ...
        require: {
            // ...
            "onurb/doctrine-yuml-bundle": "1.1.5"
        }
    }
```

- Declare the bundle in your application kernel:

```
    // app/AppKernel.php
    public function registerBundles()
    {
        // ...
        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
            // ...

            $bundles[] = new Onurb\Bundle\YumlBundle\OnurbYumlBundle();
        }
        return $bundles;
    }
```

- Add this route in your global routing\_dev configuration (with optional prefix)

```
    # app/config/routing_dev.yml

    # ...
    doctrine_yuml:
        resource: "@OnurbYumlBundle/Resources/config/routing.yml"
        prefix:   /my_prefix/
```

configure access to the yuml route (if you use security of course)

Use
---

[](#use)

Click on Doctrine icon added in the dev toolbar.

Run the `yuml:mappings` console command to save the image locally.

Personalize the render
======================

[](#personalize-the-render)

Full personalisation for mapping rendering, defining parameters or using Metadatagrapher annotations [![Colored Map with note](https://camo.githubusercontent.com/a7784d2544caef429f50334a92884fe2527f1df1a71aa54fa5459d07edb482a3/68747470733a2f2f79756d6c2e6d652f32336533346163302e706e67)](https://yuml.me/23e34ac0.png)

define the output file extension
--------------------------------

[](#define-the-output-file-extension)

Use the parameter file :

```
     # app/config/parameters.yml        => symfony 3
     # config/packages/dev/yuml.yaml    => symfony 4

    parameters:
        onurb_yuml.extension: svg
        # ...
```

Extensions allowed : jpg, png (default), svg, pdf, or json

define the yuml rendering style
-------------------------------

[](#define-the-yuml-rendering-style)

Use the parameter file :

```
     # app/config/parameters.yml        => symfony 3
     # config/packages/dev/yuml.yaml    => symfony 4

    parameters:
        onurb_yuml.style: scruffy
        # ...
```

Styles allowed : plain (default), boring or scruffy

define the graph direction
--------------------------

[](#define-the-graph-direction)

Use the parameter file :

```
     # app/config/parameters.yml        => symfony 3
     # config/packages/dev/yuml.yaml    => symfony 4

    parameters:
        onurb_yuml.direction: LR
        # ...
```

Directions allowed : LR (left to Right), RL (Right to Left), TB (Top to bottom =&gt; default).

define the graph scale
----------------------

[](#define-the-graph-scale)

Use the parameter file :

```
     # app/config/parameters.yml        => symfony 3
     # config/packages/dev/yuml.yaml    => symfony 4

    parameters:
        onurb_yuml.scale: huge
        # ...
```

Scales allowed : huge, big, normal (default), small or tiny.

Hide entities attributes properties (unique, type, length, ...)
---------------------------------------------------------------

[](#hide-entities-attributes-properties-unique-type-length-)

Use the parameter file :

```
     # app/config/parameters.yml        => symfony 3
     # config/packages/dev/yuml.yaml    => symfony 4

    parameters:
        onurb_yuml.show_fields_description: false
        # ...
```

this parameter is set to true by default since v1.1

##### Warning : In Symfony 3, don't forget to also define parameter keys in parameters.yml.dist to avoid symfony update

[](#warning--in-symfony-3-dont-forget-to-also-define-parameter-keys-in-parametersymldist-to-avoid-symfony-update)

to clear your parameters

### Toggle attributes properties on a specific class using annotations

[](#toggle-attributes-properties-on-a-specific-class-using-annotations)

to show only desired classes details if global parameter is set to false :

```
    namespace My\Bundle\Entity

    use Onurb\Doctrine\ORMMetadataGrapher\Mapping as Grapher;

    /**
    * @Grapher\ShowAttributesProperties()
    */
    Class MyClass
    {
        // ...
    }
```

And, if set to true (default), you can hide properties for a specific class :

```
    namespace My\Bundle\Entity

    use Onurb\Doctrine\ORMMetadataGrapher\Mapping as Grapher;

    /**
    * @Grapher\HideAttributesProperties()
    */
    Class MyClass
    {
        // ...
    }
```

Define colors for entities rendering
------------------------------------

[](#define-colors-for-entities-rendering)

### Define default color for a complete bundle or namespace by defining it in parameters.yml

[](#define-default-color-for-a-complete-bundle-or-namespace-by-defining-it-in-parametersyml)

```
     # app/config/parameters.yml        => Symfony 3
     # config/packages/dev/yuml.yaml    => Symfony 4

    parameters:
        onurb_yuml.colors:
            App\Security: red
            App\Blog: blue
        # ...
```

You can also define colors for classes this way... but it is easier using annotations as described next

Complete list of yuml colors availables [here](https://yuml.me/69f3a9ba.svg)[![Color list](https://camo.githubusercontent.com/ed6ed48dee4a79cf9522aa968b1a36f405058c1b3e6c0cbcd5ea9dd8279588c2/68747470733a2f2f79756d6c2e6d652f36396633613962612e737667)](https://yuml.me/69f3a9ba.svg)

### Define Entity color in graph using annotations

[](#define-entity-color-in-graph-using-annotations)

```
    namespace My\Bundle\Entity

    use Onurb\Doctrine\ORMMetadataGrapher\Mapping as Grapher;

    /**
    * @Grapher\Color("blue")
    */
    Class MyClass
    {

    }
```

### Display specific entity method

[](#display-specific-entity-method)

You can display specific methods in the graph, using annotations

```
    namespace My\Bundle\Entity

    use Onurb\Doctrine\ORMMetadataGrapher\Mapping as Grapher;

    // ...
    Class MyEntity
    {
        // ...

        /**
         * @Grapher\IsDisplayedMethod()
         */
        public function myDisplayedMethod()
        {
            // ...
        }
    }
```

Hide columns
------------

[](#hide-columns)

### Hide all columns of the entity

[](#hide-all-columns-of-the-entity)

If you want, you can hide Entity attributes with annotations : using annotation on the class :

```
/**
* @Grapher\Hidecolumns
*/
MyEntity
{
    //[...]
}
```

### Hide specific column

[](#hide-specific-column)

Or hide a specific secret column you want to hide, using annotation on the Entity column : (it could be usefull to hide you credential logic, or to avoid the display recurrent fields, like created\_at, or updated\_at in the graph...)

```
MyEntity
{
    /**
     * @ORM\Column(/* ... */)
     * @Grapher\HiddenColumn
     */
    private $secret;
}
```

Add notes to comment entities in the graph
------------------------------------------

[](#add-notes-to-comment-entities-in-the-graph)

use annotations :

```
    namespace My\Bundle\Entity

    use Onurb\Doctrine\ORMMetadataGrapher\Mapping as Grapher;

    /**
    * @Grapher\Note("Some information about this class")
    */
    Class MyClass
    {

    }
```

Notes are yellow by default, but you can customize note's' color

```
    /**
    * @Grapher\Note(value="Some information about this class", color="blue")
    */
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 78.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~86 days

Recently: every ~123 days

Total

15

Last Release

2565d ago

PHP version history (3 changes)1.0PHP &gt;=5.3.2

1.1.2PHP &gt;=5.6

1.1.6PHP &gt;=7.1.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13314735?v=4)[Nepoh](/maintainers/Nepoh)[@Nepoh](https://github.com/Nepoh)

---

Top Contributors

[![Nono1971](https://avatars.githubusercontent.com/u/5521060?v=4)](https://github.com/Nono1971 "Nono1971 (37 commits)")[![Nepoh](https://avatars.githubusercontent.com/u/13314735?v=4)](https://github.com/Nepoh "Nepoh (6 commits)")[![glynnforrest](https://avatars.githubusercontent.com/u/578458?v=4)](https://github.com/glynnforrest "glynnforrest (4 commits)")

---

Tags

symfonybundledoctrinemappingumlgraphdiagramyuml

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/nepoh-doctrine-yuml-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/nepoh-doctrine-yuml-bundle/health.svg)](https://phpackages.com/packages/nepoh-doctrine-yuml-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M734](/packages/sylius-sylius)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k13](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
