문제

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