I have a Controller that uses Annotations for Route, Method, Template and ParamConverter.
If I make any change to the file (even a whitespace change or comment) on the next page load the following error occurs
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 "SensioBundleFrameworkExtraBundleConfigurationParamConverter" 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 "SensioBundleFrameworkExtraBundleConfigurationParamConverter". If it is indeed no annotation, then you need to add @IgnoreAnnotation("ParamConverter") to the _class_ doc comment of method AcmeBundleMyBundleControllerDefaultController::viewAction().
If I clear my cache, then it will work again, but only until I make another change, then it happens again.
It looks like it's hitting an issue when reading in the annotation info for config, but I can't understand why it works/doesn't work when the change isn't actually made to any annotation.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…