1

我的机器上安装了 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").

我错过了什么?

提前致谢。

4

1 回答 1

0

我发现该错误是与注释有关的错误,而不是与孔框架有关的错误。因此,拆分注释的使用语句就可以了。

于 2017-01-28T19:46:05.420 回答