Symfony2 错误:加载的和声明的类名之间的大小写不匹配: [英] Symfony2 error : Case mismatch between loaded and declared class names:

查看:32
本文介绍了Symfony2 错误:加载的和声明的类名之间的大小写不匹配:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发 Symfony2,我使用 composer.phar update

I'm working on Symfony2 and i updated my project with composer.phar update

现在,当我使用 app_dev.php 检查我的网站时,我总是遇到此错误:

Now, when i check my site with app_dev.php i always have this error :

Case mismatch between loaded and declared class names: Blu\ProjectBun
  dle\Entity\AccountRepository vs Blu\ProjectBundle\Entity\AccountRepos
  itory

无论是否手动清除开发缓存,都是一样的.我在 AccountRepository.php 中没有什么特别的..

It's the same when i clear the dev cache, manually or not. I have nothing special in AccountRepository.php..

有什么想法吗?

我已经尝试在 DebugClassLoader 中添加 if ($name !== $class && 0 === strcasecmp($name, $class)) {.php 并没有效果

Edit : I already tried to add if ($name !== $class && 0 === strcasecmp($name, $class)) { in DebugClassLoader.php and no effect

推荐答案

Intent to var_dump($name) and var_dump($class) and strcasecmp($name, $class) 看看你为什么进入条件.

Intent to var_dump($name) and var_dump($class) and strcasecmp($name, $class) to see why you enter in the condition.

这篇关于Symfony2 错误:加载的和声明的类名之间的大小写不匹配:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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