File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public function __invoke(ServicesBuilder $builder): iterable {
6666 // region utilities
6767 yield CommandBusDependencies::Serializer->value => factory (fn () => Serializer::create ());
6868 yield SerializerInterface::class => get (CommandBusDependencies::Serializer->value );
69- yield CommandBusDependencies::EventDispatcher->value => $ this ->eventDispatcher ?? new EventDispatcher ( );
69+ yield CommandBusDependencies::EventDispatcher->value => $ this ->eventDispatcher ?? get (EventDispatcher::class );
7070 yield CommandBusDependencies::Logger->value => $ this ->logger ?? new NullLogger ();
7171 yield CommandBusDependencies::CachePool->value => $ this ->cachePool ?? new ArrayAdapter ();
7272 // endregion
Original file line number Diff line number Diff line change 77use Psr \EventDispatcher as Psr ;
88use Symfony \Component \EventDispatcher \EventDispatcher ;
99use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
10+ use Symfony \Contracts \EventDispatcher as Contracts ;
1011use WonderNetwork \SlimKernel \ServiceFactory ;
1112use WonderNetwork \SlimKernel \ServicesBuilder ;
1213use function DI \autowire ;
@@ -17,5 +18,6 @@ public function __invoke(ServicesBuilder $builder): iterable {
1718 yield EventDispatcher::class => autowire ();
1819 yield EventDispatcherInterface::class => get (EventDispatcher::class);
1920 yield Psr \EventDispatcherInterface::class => get (EventDispatcher::class);
21+ yield Contracts \EventDispatcherInterface::class => get (EventDispatcher::class);
2022 }
2123}
You can’t perform that action at this time.
0 commit comments