:
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注释的其他项目工作正常。
答案 0 :(得分:0)
已经解决了
"sensio/framework-extra-bundle": "dev-master",