Symfony 3.3.10 RunTime异常类不匹配

时间:2017-10-06 11:08:08

标签: symfony

加载和声明的类名称之间不匹配:“Symfony \ Bundle \ FrameWorkBundle \ Controller \ Controller”vs“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');
}
}

1 个答案:

答案 0 :(得分:0)

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

foreach($Directory in Get-ChildItem -Path C:\Users\myUser\Desktop -Recurse | Where-Object{($_.Name.Substring(0,3) -eq 'BL-')}){

}

而不是

use Symfony\Bundle\FrameworkBundle\Controller\Controller;