我在我的机器上安装了PHP 7.1,并且正在使用Symfony开发应用程序。当我尝试将来自同一命名空间的use语句分组时,我收到了一个错误,说它们从未被声明过。
我的use
:
use Sensio\Bundle\FrameworkExtraBundle\Configuration\{
Route, Method
};
浏览器中显示的错误:
[Semantical Error] The annotation "@Route" in method AppBundle\Controller\EpisodiosController::listarAction() was never imported. Did you maybe forget to add a "use" statement for this annotation? in /home/vinicius/Documentos/controle-de-series/src/AppBundle/Controller/ (which is being imported from "/home/vinicius/Documentos/controle-de-series/app/config/routing.yml").
我错过了什么吗?
提前致谢。
答案 0 :(得分:0)
我发现错误是关于注释的错误,而不是漏洞框架。因此,拆分注释的使用语句就可以了。