我有一个控制器,它使用路由、方法、模板和 ParamConverter 的注释。
如果我在下一页加载对文件进行任何更改(甚至是空格更改或注释),则会发生以下错误
Cannot import resource "/home/sites/MySite/src/Acme/Bundle/MyBundle/Controller/" from "/home/sites/MySite/app/config/routing.yml".
FileLoaderLoadException: Cannot import resource "/home/sites/MySite/src/Acme/Bundle/MyBundle/Controller/" from "/home/sites/MySite/app/config/routing.yml"
AnnotationException: [Semantical Error] The class "Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter" is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation to the _class_ doc comment of "Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter". If it is indeed no annotation, then you need to add @IgnoreAnnotation("ParamConverter") to the _class_ doc comment of method Acme\Bundle\MyBundle\Controller\DefaultController::viewAction().
如果我清除我的缓存,那么它会再次工作,但只有在我进行另一次更改之前,它才会再次发生。在读取配置的注释信息时,它似乎遇到了问题,但我不明白为什么它在实际上没有对任何注释进行更改时起作用/不起作用。