Question

Why, conceptually, there is not inside symfony cmf app console generate bundle. I have tried php app/console generate:bundle, but it doesn't work.

Was it helpful?

Solution 2

The generate:bundle bundle command is provided by SensioGeneratorBundle.

composer.json

require:    
    ...
    "sensio/generator-bundle": "2.3.*@dev"

Add it to your composer.json , update, register the bundle in app/AppKernel.php and the command will be available.

OTHER TIPS

Symfony CMF is just the Symfony2 full-stack framework with some extra bundles and extensions.

The generate:bundle command is a command from the SensioGeneratorBundle. That bundle is included in the symfony standard edition, but not in the symfony cmf standard edition. Just install that bundle and you should be good to go:

$ php composer.phar require sensio/generator-bundle:2.3.*
// app/AppKernel.php

// ...
public function registerBundles()
{
    // ...

    if (...) {
        $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle()
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top