PHPackages                             remg/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. remg/generator-bundle

AbandonedArchivedSymfony-bundle[Utility &amp; Helpers](/categories/utility)

remg/generator-bundle
=====================

Code generation tool for Symfony3.

2521.8k2[6 issues](https://github.com/Remg/GeneratorBundle/issues)PHP

Since Sep 20Pushed 8y ago2 watchersCompare

[ Source](https://github.com/Remg/GeneratorBundle)[ Packagist](https://packagist.org/packages/remg/generator-bundle)[ RSS](/packages/remg-generator-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

RemgGeneratorBundle
===================

[](#remggeneratorbundle)

[![Build Status](https://camo.githubusercontent.com/526eb9b23f08a29c765d2046efd06f217d566c582f4352b467df96d89f670370/68747470733a2f2f7472617669732d63692e6f72672f52656d672f47656e657261746f7242756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Remg/GeneratorBundle)[![Test Coverage](https://camo.githubusercontent.com/66b8a397f557128b939e416b295280f68cb6f358459c8e43915a6d8f31b8bf21/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f52656d672f47656e657261746f7242756e646c652f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/Remg/GeneratorBundle/coverage)[![SensioLabsInsight](https://camo.githubusercontent.com/8dc1370947fb5f12020746ea2d73ba2fad401ab024be54599c3dc006f5d9a624/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f62653165616332352d316162612d346663332d386464632d6335393132343432353935352f6d696e692e706e67)](https://insight.sensiolabs.com/projects/be1eac25-1aba-4fc3-8ddc-c59124425955)

Introduction
------------

[](#introduction)

This bundle provides commands to intuitively generate code inside [Symfony](http://symfony.com/)-based projects.

Overview
--------

[](#overview)

[![Example](Resources/doc/images/remg_generator_example.png?raw=true "RemgGeneratorBundle")](Resources/doc/images/remg_generator_example.png?raw=true)

Features
--------

[](#features)

### 1. Entity generation

[](#1-entity-generation)

#### Fields

[](#fields)

- Handles all [Doctrine2 column types](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html).

#### Associations

[](#associations)

- Handles all [Doctrine2 association types](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.html)(OneToOne, OneToMany, ManyToOne, ManyToMany).
- Handles unidirectional and bidirectional associations.
- Auto-detect association mappings when generating an Entity already targetted by other entities.

#### Configuration formats

[](#configuration-formats)

- Handles all [Doctrine2 metadata drivers](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/metadata-drivers.html)(annotations, yaml, xml, php).

### 2. Entity re-generation

[](#2-entity-re-generation)

The bundle provides a command that will start an entity generation from the mappping informations of an existing entity. It is then possible to edit or add fields and associations before the entity is regenerated from scratch.

This same command can be used to regenerate an entity in a different mapping configuration format.

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

[](#installation)

### Step 1: Download the bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require --dev remg/generator-bundle dev-master
```

This command requires you to have [Composer](https://getcomposer.org/) installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the Composer documentation.

### Step 2: Enable the bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding *new Remg\\GeneratorBundle\\RemgGeneratorBundle()* to the list of registered bundles for the **dev** environment 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'])) {
            $bundles[] = new Remg\GeneratorBundle\RemgGeneratorBundle();
            // ...
        }
    }
    // ...
}
```

### Step 3: Configure the bundle

[](#step-3-configure-the-bundle)

The bundle comes with a default configuration, which is listed below. You can define these options in your configuration if you need to change them:

```
remg_generator:
    entity:
        # available configuration formats are: 'annotation', 'yaml', 'xml' and 'php'.
        configuration_format: annotation
```

Since this bundle is only useful in command line interface, you can override the bundle configuration in your development configuration in `app/config/config_dev.yml`.

Usage
-----

[](#usage)

You can now generate new Doctrine2 entities using the command below:

```
$ php bin/console remg:generate:entity
```

You can also regenerate Doctrine2 entities from scratch using the command below:

```
$ php bin/console remg:regenerate:entity
```

**NOTE:** Since this bundle can only generate code, and not manipulate existing code, this command will regenerate the entity from scratch without implementing any custom code that could live in the existing entity.

**No code can be lost. Each file generation checks if the target file already exists, and creates a timestamped backup of the file before generation.**

Under development
-----------------

[](#under-development)

- Repository generation.
- Entity edition.
- CRUD generation (handling embed form collections).

License
-------

[](#license)

This bundle is under the MIT license. See the complete license [in the bundle](LICENSE).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/1baa3171ee2991fb9c058ea6002d2a8168b9762bf10ac223b4b2ee229dbd2394?d=identicon)[Remg](/maintainers/Remg)

---

Top Contributors

[![Remg](https://avatars.githubusercontent.com/u/8271347?v=4)](https://github.com/Remg "Remg (4 commits)")[![yhoiseth](https://avatars.githubusercontent.com/u/8469540?v=4)](https://github.com/yhoiseth "yhoiseth (1 commits)")

### Embed Badge

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

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

###  Alternatives

[select2/select2

Select2 is a jQuery based replacement for select boxes.

26.0k7.8M27](/packages/select2-select2)[iamcal/php-emoji

This is a PHP library for dealing with Emoji, allowing you to convert between various native formats and displaying them using HTML.

1.3k481.1k](/packages/iamcal-php-emoji)[noahbuscher/macaw

Simple PHP router class.

88717.1k8](/packages/noahbuscher-macaw)[demi/seo

Library for working with SEO parameters of models

131.6k](/packages/demi-seo)

PHPackages © 2026

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