JMSDiExtra makes not callable actions in Controller
Hi, I noticed an issue with JMSDiExtraBundle version 1.5.0. In my code I have a TestController that extends a BaseController (that not extends Symfony base controller). In BaseController I put all my common properties that are injected, such as container or logger. Now, I added an action testAction in TestController and the message I receive when I call it is:
request.CRITICAL: Uncaught PHP Exception InvalidArgumentException: "Controller "ACME\TestBundle\Controller\TestController::testAction" for URI "/test" is not callable."
I figured out that the problem is coming from the class JMS\DiExtraBundle\HttpKernel\ControllerResolver, line 83, because when it tries to call the action request, it calls the BaseController instead of TestController.
To resolve this issue in my code, I added a property in my TestController that contains a service injected, even if I not use it.
I think that is a problem with reflection.
I have also ran into this exact bug
I'm having this exact same bug.
Same!
:-1:
Same for me. It's hard to believe, but this bug was reported 3 years, 5 months and 16 days ago: https://github.com/schmittjoh/JMSDiExtraBundle/issues/39, and it's still open.