为什么,从概念上讲,内部没有symfony cmf应用程序控制台生成捆绑包。我已经尝试过php应用程序/控制台生成:捆绑,但它不起作用。
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 SensioBundleGeneratorBundleSensioGeneratorBundle()
}
}
generate:bundle
bundle 命令由 SensioGeneratorBundle 提供。
作曲家.json
require:
...
"sensio/generator-bundle": "2.3.*@dev"
将其添加到您的 composer.json ,更新,在 app/AppKernel.php
中注册捆绑包,该命令将可用。