2013-06-19 57 views

回答

1

generate:bundle捆綁包命令由SensioGeneratorBundle提供。

composer.json

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

將它添加到您的composer.json,更新,在app/AppKernel.php註冊捆綁和命令將可用。

3

Symfony CMF就是Symfony2全棧框架,帶有一些額外的捆綁和擴展。

generate:bundle命令是來自SensioGeneratorBundle的命令。該軟件包包含在symfony標準版中,但不包含在symfony cmf標準版中。只需安裝該軟件包,您應該很好地去:

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

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

    if (...) { 
     $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle() 
    } 
}