You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there's nothing to inject in MyController, the following error occurs:
Error: Cannot instantiate abstract class MyBundle\BaseController
Current workaround:
Inject something useless in MyController
The text was updated successfully, but these errors were encountered:
hehachris
changed the title
Cannot instantiate abstract class BaseController...
Cannot instantiate abstract class BaseController if Child controller has nothing to inject
Dec 16, 2015
Hy. i found the problem and fixed it on my local bundle, the problem happens because the annotation driver returns null when the class has no annotations and the metadata factory needs at least a reflection class to build its metadata hierarchy.
to do quick local test go to your vendors and edit the class JMS\DiExtraBundle\Metadata\Driver\AnnotationDriver
I wonder if i can send a PR removing these lines, i wonder if these lines makes any difference at all to the bundle. I've also checked out the bundle and created a test case for this issue, and entire test suit is passing with this change.
If there's nothing to inject in
MyController
, the following error occurs:Current workaround:
MyController
The text was updated successfully, but these errors were encountered: