JMSDiExtraBundle icon indicating copy to clipboard operation
JMSDiExtraBundle copied to clipboard

DIExtraBundle required Annotation Class without using the class

Open y1o1 opened this issue 12 years ago • 1 comments

One of the bundle i use requires FOSRestBundle Annotation on Controller. Even my application does not include the controller in routes, DIExtraBundle tries to pre-cache the controller when kernel accessed at the first time, and so it throw exception.

[Doctrine\Common\Annotations\AnnotationException]                                                                                                                                                                     
[Semantical Error] The annotation "@FOS\RestBundle\Controller\Annotations\View" in method SomeBundle\Controller::indexAction() does not exist, or could not be auto-loaded.  

I understood that Controller is the special class as described in http://jmsyst.com/bundles/JMSDiExtraBundle/master/usage but the target Controllers should only be "in-routed," and "non-routed" Controllers should not be the target of parsing annotation.

Are there a way to disable parsing specified controller?

y1o1 avatar Jul 26 '13 08:07 y1o1

@schmittjoh please fix this issue. Use case:

  1. I'm installing SonataNotificationBundle
  2. It has controller with FosRestBundle annotations
  3. I haven't installed this bundle
  4. Got an exception that annotation is missing. Why? I don't using this controller.

Koc avatar Feb 05 '14 19:02 Koc