سؤال

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.

هل كانت مفيدة؟

المحلول 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.

نصائح أخرى

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()
    }
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top