dst67283 2014-05-23 14:03
浏览 157
已采纳

在Symfony中生成Bundle

Can't find a solution for this on stack.

I'm using ubuntu server,

$php app/console generate:bundle --namespace=WMDN/FirstBundle --format=yml

goes fine until :

Generating the bundle code: OK
Checking that the bundle is autoloaded: FAILED
Confirm automatic update of your Kernel [yes]? yes
Enabling the bundle inside the Kernel: OK
Confirm automatic update of the Routing [yes]? yes
Importing the bundle routing resource: OK


 The command was not able to configure everything automatically.
You must do the following changes manually.


- Edit the composer.json file and register the bundle
namespace in the "autoload" section:

I thought it was permissions, and set the whole dir to 775 and made sure owner was good. I thought it was outdated bug for symfony and deleted whole dir, and got 2.4.4

I'm following a tutorial and their bundle generates just fine and I'd like mine to do it as well.

Why can it not autoload? My Namespace should be good to use. I cannot figure it out. I have composer installed.

Following this tutorial series : http://www.youtube.com/watch?v=GIcY5YYfZ14 and I'd really like to get my first bundle created so I may continue.

In conclusion, what are the reasons a bundle would fail autoload?

  • 写回答

1条回答 默认 最新

  • dqq48152418 2014-05-23 16:38
    关注

    Per to comments, solution was to set the --src parameter correctly.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条