This bundle extends the commands provided by SensioGeneratorBundle, adding a MongoDB document generator and CRUD generators for those MongoDB documents.
Add the requirement to composer:
$ php composer.phar require ismaambrosi/generator-bundle:dev-master
You will also need to install the DoctrineMongoDBBundle. The instructions on how to install it are available in the Symfony2 documentation.
<?php
// app/AppKernel.php
public function registerBundles()
{
// ...
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
// ...
$bundles[] = new IsmaAmbrosi\Bundle\GeneratorBundle\IsmaAmbrosiGeneratorBundle();
}
}
It is recommended to disable this bundle on the production environment.