可以参考官方文档给出来的解决办法
http://symfonychina.com/doc/current/bundles/SensioGeneratorBundle/commands/generate_bundle.html