PHPackages                             onurb/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. onurb/doctrine-yuml-bundle

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

onurb/doctrine-yuml-bundle
==========================

Symfony Bundle to visualize the mapping of your entities with Yuml

1.1.6(6y ago)4198.6k↓37.5%11[1 PRs](https://github.com/Nono1971/doctrine-yuml-bundle/pulls)MITPHPPHP &gt;=7.1.3CI failing

Since Mar 6Pushed 5y ago2 watchersCompare

[ Source](https://github.com/Nono1971/doctrine-yuml-bundle)[ Packagist](https://packagist.org/packages/onurb/doctrine-yuml-bundle)[ RSS](/packages/onurb-doctrine-yuml-bundle/feed)WikiDiscussions master Synced 1mo ago

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

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 90.2% 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

2520d 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://www.gravatar.com/avatar/84c2f5210c5e434d74b58a542153023975d6ae32768e0f9449d471f4b4fb5663?d=identicon)[nono1971](/maintainers/nono1971)

---

Top Contributors

[![Nono1971](https://avatars.githubusercontent.com/u/5521060?v=4)](https://github.com/Nono1971 "Nono1971 (37 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/onurb-doctrine-yuml-bundle/health.svg)

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

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[sonata-project/doctrine-orm-admin-bundle

Integrate Doctrine ORM into the SonataAdminBundle

46117.7M155](/packages/sonata-project-doctrine-orm-admin-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

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