Symfony cache:clear @Method 注释的语义错误
Symfony cache:clear Semantical Error with @Method Anotation
在我的生产版本上 运行:
php app/console cache:clear --env=prod --no-debug
Symofny 抛出 AnnotationExeption
[Symfony\Component\Config\Exception\FileLoaderLoadException]
Cannot import resource "<path>/App/AppBundle/Controller/DefaultController.php" from "<path>/App/AppBundle/Resources/config/routing.yml". ([Semantical Error] The class "Method" 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 "Method". If it is indeed no annotation, then you need to add @IgnoreAnnotation("Method") to the _class_ doc comment of class @Sensio\Bundle\FrameworkExtraBundle\Configuration\Method.)
[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] The class "Method" 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 "Method". If it is indeed no annotation, then you need to add @IgnoreAnnotation("Method") to the _class_ doc comment of class @Sensio\Bundle\FrameworkExtraBundle\Configuration\Method.
不知道为什么,在我的本地计算机上它工作正常。其他使用 symfony 注释的项目工作正常。
已通过
解决
"sensio/framework-extra-bundle": "dev-master",
同本期
Symfony2 ParamConverter not associated with @Annotation (cache must be cleared after any file change)
在我的生产版本上 运行:
php app/console cache:clear --env=prod --no-debug
Symofny 抛出 AnnotationExeption
[Symfony\Component\Config\Exception\FileLoaderLoadException]
Cannot import resource "<path>/App/AppBundle/Controller/DefaultController.php" from "<path>/App/AppBundle/Resources/config/routing.yml". ([Semantical Error] The class "Method" 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 "Method". If it is indeed no annotation, then you need to add @IgnoreAnnotation("Method") to the _class_ doc comment of class @Sensio\Bundle\FrameworkExtraBundle\Configuration\Method.)
[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] The class "Method" 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 "Method". If it is indeed no annotation, then you need to add @IgnoreAnnotation("Method") to the _class_ doc comment of class @Sensio\Bundle\FrameworkExtraBundle\Configuration\Method.
不知道为什么,在我的本地计算机上它工作正常。其他使用 symfony 注释的项目工作正常。
已通过
解决"sensio/framework-extra-bundle": "dev-master",
同本期 Symfony2 ParamConverter not associated with @Annotation (cache must be cleared after any file change)