@@ -43,8 +43,8 @@ private static function createContainer(
4343 ) use ($ options ) {
4444 return self ::createTransport ($ locator , $ loop , $ options );
4545 },
46- Hydrator::class => function (ContainerInterface $ container ) use ($ options ) {
47- return self ::createHydrator ($ container , $ options );
46+ Hydrator::class => function (LoopInterface $ loop , CommandBusInterface $ commandBus ) use ($ options ) {
47+ return self ::createHydrator ($ loop , $ commandBus , $ options );
4848 },
4949 CommandBusInterface::class => function (ContainerInterface $ container ) {
5050 return CommandBusFactory::create ($ container );
@@ -67,12 +67,12 @@ private static function createTransport(
6767 return TransportFactory::create ($ locator , $ loop , $ options [Options::TRANSPORT_OPTIONS ]);
6868 }
6969
70- private static function createHydrator (ContainerInterface $ container , array $ options = [])
70+ private static function createHydrator (LoopInterface $ loop , CommandBusInterface $ commandBus , array $ options = [])
7171 {
7272 if (!isset ($ options [Options::HYDRATOR_OPTIONS ])) {
7373 throw new InvalidArgumentException ('Missing Hydrator options ' );
7474 }
7575
76- return HydratorFactory::create ($ container , $ options [Options::HYDRATOR_OPTIONS ]);
76+ return HydratorFactory::create ($ loop , $ commandBus , $ options [Options::HYDRATOR_OPTIONS ]);
7777 }
7878}
0 commit comments