【问题标题】:Symfony 3.3.10 RunTime exception Class mismatchSymfony 3.3.10 运行时异常类不匹配
【发布时间】:2017-10-06 11:08:07
【问题描述】:

加载和声明的类名之间的大小写不匹配:“Symfony\Bundle\FrameWorkBundle\Controller\Controller”与“Symfony\Bundle\FrameworkBundle\Controller\Controller”。

在我的控制器中我有这个:

namespace AppBundle\Controller;
use Symfony\Bundle\FrameWorkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;

class MainController extends Controller
{
public function homepageAction()
{
    return $this->render('main/index.html.twig');
}
}

【问题讨论】:

  • 区分大小写是最近的变化。您是否查看了各种更改日志以了解还有什么不同?你是从哪个版本升级的?

标签: symfony


【解决方案1】:

也许只是修复错误告诉您的内容? (对不起,如果这听起来很刺耳)

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

而不是

use Symfony\Bundle\FrameWorkBundle\Controller\Controller;

【讨论】:

  • 嗯,我现在遇到了路由问题。我不能让他们工作。如果我编辑 app/config/routes.yml 它给我它不是一个有效的 YML 文件。如何让它们工作,Symfony 的文档根本没有解释。
猜你喜欢
  • 2014-05-23
  • 1970-01-01
  • 2013-03-02
  • 2016-12-18
  • 2012-07-24
  • 2020-10-21
  • 2011-04-05
  • 2017-05-28
  • 2014-04-09
相关资源
最近更新 更多