Does it sound like a correct approach to inject the whole Bus in commandHandlers so the latter could call $this->messageBus->dispatch($events);
class OneCommandHandler
{
private $messageBus;
//.....
public function handle(Command $command)
{
//..... will at some points hopefully returns DomainEvents
}
private function dispatch(DomainEvents $events)
{
$this->messageBus->dispatch($events);
}
}
Isn’t it too much coupling?