Closed Drachenkaetzchen closed 7 years ago
Same problem here with a very similar configuration. Any advice?
Solved thanks to this: https://github.com/api-platform/api-platform/issues/317#issuecomment-316436505
Just add something like
AppBundle\Action\:
resource: '../../src/AppBundle/Action'
public: true
autowire: true
tags: ['controller.service_arguments']
to your services.yml
Fixed in API Platform 2.1.
Hi,
I'm upgrading my project to Symfony 3.3 and the new api-platform. However, when I attempt to autowire an action, I receive the error that no services are passed to my action. I have enabled service autowiring.
It is noteworthy that the action is instanciated by Symfonys
ControllerResolver
line 202, where it creates a new instance of my class without any parameters appended.Do you have any idea where I could start looking?
Entity:
routing.yml:
Action: