File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ CompiledContainer.php
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ public function __invoke(ServicesBuilder $builder): iterable {
6464 // endregion
6565
6666 // region utilities
67- yield CommandBusDependencies::Serializer->value => factory (Serializer::create (... ));
67+ yield CommandBusDependencies::Serializer->value => factory (fn () => Serializer::create ());
6868 yield SerializerInterface::class => get (CommandBusDependencies::Serializer->value );
6969 yield CommandBusDependencies::EventDispatcher->value => $ this ->eventDispatcher ?? new EventDispatcher ();
7070 yield CommandBusDependencies::Logger->value => $ this ->logger ?? new NullLogger ();
Original file line number Diff line number Diff line change 1717use WonderNetwork \SlimKernel \Messenger \Kernel \TransportLocatorBuilder ;
1818
1919final class MessengerTest extends TestCase {
20+ protected function setUp (): void {
21+ if (file_exists ($ filename = __DIR__ .'/../../.cache/CompiledContainer.php ' )) {
22+ unlink ($ filename );
23+ }
24+ }
25+
2026 public function testMessenger (): void {
2127 $ transportName = 'in-memory ' ;
2228
2329 $ root = realpath (__DIR__ .'/../Resources/Messenger ' )
2430 ?: throw new RuntimeException ('Oops ' );
2531 $ container = KernelBuilder::start ($ root )
32+ ->useCache (__DIR__ .'/../../.cache/ ' )
2633 ->register (
2734 new MessengerServiceFactory (
2835 commandPath: 'src/*AsyncHandler.php ' ,
You can’t perform that action at this time.
0 commit comments