Symfony Workflow Cannot autowire service

I’m using workflow for the first time injecting WorkflowInterface in my CommandHandler.

i get this error:

Cannot autowire service "AppMyClassMessageHandlerMyClassCommandHandler": argument "$workflow" of method "__construct()" references interface "SymfonyComponentWorkflowWorkflowInterface" but no such service exists. You should maybe alias this interface to the existing "state_machine.user" service.

Should i have to define alias in service.yaml ? Why ?

Source: Symfony Questions

Was this helpful?

1 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *