symfony3 添加一个bundle,无法启动PHP内置服务器

来源:互联网 发布:使用ping命令测试网络 编辑:程序博客网 时间:2024/05/21 10:26

symfony 添加一个bundle(比如AdminBundle),添加完成后,启动PHP 内置服务器的时候,报如下错误:

PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "AdminBundle" from namespace "AdminBundle".
Did you forget a "use" statement for another namespace?

错误截图:

 

解决方法:

修改composer.json 文件自动加载配置项


修改前截图:


修改后截图:



修改完后运行composer update   

启动内置服务器,成功

over!!!




ps: 解决方法参考 https://github.com/symfony/symfony-standard/issues/1098
原创粉丝点击