PhpStorm 2019.2 Symfony 控制器中未使用的元素PHP风暴 2020
我正在使用PhpStorm 2019.2在Symfony控制器中,方法被突出显示为未使用。Xdebug,然后我得到一个错误
我在 https://youtrack.jetbrains.com 上读到这可能是一个错误,新版本的IDE不能与注释一起正常工作
C:\OpenServer\OSPanel\modules\php\PHP_7.2\php.exe -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9090 -dxdebug.remote_host=127.0.0.1 C:\OpenServer\OSPanel\domains\myblog.loc\src\Controller\IndexController.php
Fatal error: Class 'Symfony\Bundle\FrameworkBundle\Controller\Controller' not found in C:\OpenServer\OSPanel\domains\myblog.loc\src\Controller\IndexController.php on line 18
Call Stack:
0.0679 382496 1. {main}() C:\OpenServer\OSPanel\domains\myblog.loc\src\Controller\IndexController.php:0
Dump $_SERVER
$_SERVER['REMOTE_ADDR'] is undefined
$_SERVER['REQUEST_METHOD'] is undefined
Dump $_SESSION
$_SESSION['*'] is undefined
Dump $_REQUEST
Process finished with exit code 255
一些控制器
class ContactController extends Controller
{
/**
* @Route("/contact", name="contact_view")
* @return \Symfony\Component\HttpFoundation\Response
*/
public function contactView()
{
return $this->render('contact/contact.html.twig', [
]);
}
}
目前,类及其操作在控制器中被标记为未使用,我该怎么办?