File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
Component/Message/Handler Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1818use Symfony \Component \HttpFoundation \RequestStack ;
1919use Symfony \Component \HttpFoundation \Session \SessionInterface ;
2020use Symfony \Component \HttpKernel \HttpKernelInterface ;
21+ use Symfony \Component \Message \MessageBusInterface ;
2122use Symfony \Component \Routing \RouterInterface ;
2223use Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorageInterface ;
2324use Symfony \Component \Security \Core \Authorization \AuthorizationCheckerInterface ;
@@ -84,6 +85,7 @@ public static function getSubscribedServices()
8485 'security.token_storage ' => '? ' .TokenStorageInterface::class,
8586 'security.csrf.token_manager ' => '? ' .CsrfTokenManagerInterface::class,
8687 'parameter_bag ' => '? ' .ContainerInterface::class,
88+ 'message_bus ' => '? ' .MessageBusInterface::class,
8789 );
8890 }
8991}
Original file line number Diff line number Diff line change 1212 <argument type =" collection" /> <!-- Middlewares -->
1313 </service >
1414
15+ <service id =" Symfony\Component\Message\MessageBusInterface" alias =" message_bus" />
16+
17+ <!-- Logging -->
1518 <service id =" message.middleware.debug.logging" class =" Symfony\Component\Message\Debug\LoggingMiddleware" >
1619 <argument type =" service" id =" logger" />
1720
Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ public function __construct(array $handlers)
3737
3838 public function __invoke ($ message )
3939 {
40- foreach ( $ this -> handlers as $ handler ) {
41- yield $ handler ($ message );
42- }
40+ return array_map ( function ( $ handler ) use ( $ message ) {
41+ return $ handler ($ message );
42+ }, $ this -> handlers );
4343 }
4444}
You can’t perform that action at this time.
0 commit comments