PHPackages                             pandora/doctrine-generator-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. pandora/doctrine-generator-bundle

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

pandora/doctrine-generator-bundle
=================================

Symfony2 bundle to generate model or interface class

1.0.0(11y ago)1108MITPHP

Since Sep 5Pushed 11y ago1 watchersCompare

[ Source](https://github.com/angonyfox/doctrine-generator-bundle)[ Packagist](https://packagist.org/packages/pandora/doctrine-generator-bundle)[ RSS](/packages/pandora-doctrine-generator-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Symfony2 bundle to generate model or interface class

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

[](#installation)

1. Add bundle as dependency to the composer.json

```
{
    "require": {
        "pandora/doctrine-generator-bundle": "dev-master"
    }
}
```

2. Run "composer update"
3. Make sure to enable PandoraDoctrineGeneratorBundle in AppKernel.php .

```
public function registerBundles()
{
    $bundles = array(
        // ...
        new Pandora\DoctrineGeneratorBundle\PandoraDoctrineGeneratorBundle(),
    );
}
```

Available Commands
------------------

[](#available-commands)

- use doctrine:generate:model or generate:doctrine:model to generate single model class
- use doctrine:generate:models or generate:doctrine:models to generate model in bundle

Usage
-----

[](#usage)

### doctrine:generate:model

[](#doctrinegeneratemodel)

```
php app/console doctrine:generate:model --model=YourBundle:Blog/Post

```

The above command would initialize a new model in the following model namespace *Acme\\BlogBundle\\Model\\Blog\\Post*

You can also optionally spectify the fields you want to generate in the new model:

```
php app/console doctrine:generate:model --model=YourBundle:Blog/Post --fields="title:string(255) body:text"

```

The command can also generate the corresponding entity repository class with the *--with-repository* option:

```
php app/console doctrine:generate:model --model=YourBundle:Blog/Post --with-repository

```

By default, the command uses annotations for the mapping information; change it with *--format*:

```
php app/console doctrine:generate:model --model=YourBundle:Blog/Post --format=yml

```

To generate or update the corresponding entity class, use the *--with-entity* option:

```
php app/console doctrine:generate:model --model=YourBundle:Blog/Post --with-entity

```

To generate the corresponding interface class, use the *--with-interface* option:

```
php app/console doctrine:generate:model --model=YourBundle:Blog/Post --with-interface

```

### doctrine:generate:models

[](#doctrinegeneratemodels)

- To a bundle:

```
php app/console doctrine:generate:models YourBundle

```

- To a single model:

```
php app/console doctrine:generate:models YourBundle:User
php app/console doctrine:generate:models Your/Bundle/Model/User

```

- To a namespace:

```
php app/console doctrine:generate:models YourBundle/Model

```

If the entities are not stored in a bundle, and if the classes do not exist, the command has no way to guess where they should be generated. In this case, you must provide the *--path* option:

```
php app/console doctrine:generate:models Your/Bundle/Model --path=src/

```

By default, the unmodified version of each model is backed up and saved (e.g. Product.php~). To prevent this task from creating the backup file, pass the *--no-backup* option:

```
php app/console doctrine:generate:models Your/Bundle/Model --no-backup

```

To generate or update the corresponding entity class, use the *--with-entity* option:

```
php app/console doctrine:generate:models YourBundle --with-entity

```

To generate the corresponding interface class, use the *--with-interface* option:

```
php app/console doctrine:generate:models YourBundle --with-interface

```

**Important:** Even if you specified Inheritance options in your XML or YAML Mapping files the generator cannot generate the base and child classes for you correctly, because it doesnot know which class is supposed to extend which. You have to adjust the model code manually for inheritance to work!

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

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

Unknown

Total

1

Last Release

4311d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c975b9692b99d2c3bb413cd623cf61cee177b42a6416e419ef5dfc3d4a564a6?d=identicon)[angonyfox](/maintainers/angonyfox)

---

Top Contributors

[![angonyfox](https://avatars.githubusercontent.com/u/1295513?v=4)](https://github.com/angonyfox "angonyfox (20 commits)")

---

Tags

symfonygeneratordoctrinemodelinterface

### Embed Badge

![Health badge](/badges/pandora-doctrine-generator-bundle/health.svg)

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

###  Alternatives

[api-platform/schema-generator

Various tools to generate a data model based on Schema.org vocables

4734.4M7](/packages/api-platform-schema-generator)[omines/datatables-bundle

Symfony DataTables Bundle with native Doctrine ORM, Elastica and MongoDB support

2841.5M6](/packages/omines-datatables-bundle)[webonaute/doctrine-fixtures-generator-bundle

Generate Fixture from your existing data in your database. You can specify the Entity name and the IDs you want to import in your fixture.

64184.4k](/packages/webonaute-doctrine-fixtures-generator-bundle)[ambta/doctrine-encrypt-bundle

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

72280.2k](/packages/ambta-doctrine-encrypt-bundle)[prezent/doctrine-translatable-bundle

Integrate the doctrine-translatable extension in Symfony

14722.0k7](/packages/prezent-doctrine-translatable-bundle)[ao/translation-bundle

Doctrine as symfony translation provider + a nice gui for editing translations.

243.8k](/packages/ao-translation-bundle)

PHPackages © 2026

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