Closed ruudk closed 6 years ago
Am I missing something here? I had to add the following aliases to my config for this to work:
services:
SimpleBus\SymfonyBridge\Bus\CommandBus: '@command_bus'
SimpleBus\SymfonyBridge\Bus\EventBus: '@event_bus'
@ruudk Do you know why @kbond needs to at these service aliases?
Hmm, is the Symfony Bridge enabled in the kernel?
Yes, from what I can see, https://github.com/SimpleBus/SymfonyBridge/pull/52 doesn't actually enable these classes to be autowired. These aliases still need to be added. Does it work for you?
'command_bus' is simple an alias of 'simplebus.command_bus'. So it should just work.
What version of symfony are you using?
What happens when you do
$this->get(CommandBus::class)
I am using 3.4@RC2. That gives me the following error:
...references class "SimpleBus\SymfonyBridge\Bus\CommandBus" but no such service exists. You should maybe alias this class to the existing "simple_bus.command_bus" service.
I'm not sure how it is working for you.
@kbond You are right. I'm sorry, I totally missed this. I will fix this the proper way in SymfonyBridge :v: /cc @cmodijk
https://github.com/SimpleBus/AsynchronousBundle/pull/15 https://github.com/SimpleBus/SymfonyBridge/pull/52