致命错误:Class 'AppBundle\AppBundle'安装 DoctrineFixturesBundle 后在 AppKernel.php 中找不到 [英] Fatal error: Class 'AppBundle\AppBundle' not found in AppKernel.php after install DoctrineFixturesBundle

查看:44
本文介绍了致命错误:Class 'AppBundle\AppBundle'安装 DoctrineFixturesBundle 后在 AppKernel.php 中找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用此 文档 在 symfony 2.6.6 中安装 DoctrineFixturesBundle.但是,我得到:

I try install DoctrineFixturesBundle in symfony 2.6.6 using this documentation. However, I get:

致命错误:找不到AppBundle\AppBundle"类

Fatal error: Class 'AppBundle\AppBundle' not found

如果我从 AppKernel.php 中删除 AppBundle\AppBundle,我会遇到与另一个包相同的问题.我通过 Symfony 安装程序安装了 Symfony,在添加之前我的 composer.json 是空的:

If I remove AppBundle\AppBundle from AppKernel.php, I have the same problem with another bundle. I installed Symfony via the Symfony installer and my composer.json was empty before I added:

{
    "require": {
        "doctrine/doctrine-fixtures-bundle": "2.2.*"
    }
}

也许这是问题的一部分?

Maybe this is a part of the problem?

推荐答案

你应该添加 autoloading配置到您的composer.json.

这篇关于致命错误:Class 'AppBundle\AppBundle'安装 DoctrineFixturesBundle 后在 AppKernel.php 中找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆