File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
src/Symfony/Component/Message Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1818use Symfony \Component \DependencyInjection \Definition ;
1919use Symfony \Component \DependencyInjection \Exception \RuntimeException ;
2020use Symfony \Component \DependencyInjection \Reference ;
21- use Symfony \Component \Message \Handler \MessageHandlerCollection ;
21+ use Symfony \Component \Message \Handler \ChainHandler ;
2222
2323/**
2424 * @author Samuel Roze <samuel.roze@gmail.com>
@@ -86,7 +86,7 @@ private function registerHandlers(ContainerBuilder $container)
8686 if (1 === count ($ handlers )) {
8787 $ handlersByMessage [$ message ] = current ($ handlers );
8888 } else {
89- $ d = new Definition (MessageHandlerCollection ::class, array ($ handlers ));
89+ $ d = new Definition (ChainHandler ::class, array ($ handlers ));
9090 $ d ->setPrivate (true );
9191 $ serviceId = hash ('sha1 ' , $ message );
9292 $ definitions [$ serviceId ] = $ d ;
Original file line number Diff line number Diff line change 1616 *
1717 * @author Samuel Roze <samuel.roze@gmail.com>
1818 */
19- class MessageHandlerCollection
19+ class ChainHandler
2020{
2121 /**
2222 * @var callable[]
Original file line number Diff line number Diff line change 1212namespace Symfony \Component \Message ;
1313
1414use Symfony \Component \Message \Exception \NoHandlerForMessageException ;
15- use Symfony \Component \Message \Handler \MessageHandlerCollection ;
15+ use Symfony \Component \Message \Handler \ChainHandler ;
1616
1717/**
1818 * @author Samuel Roze <samuel.roze@gmail.com>
@@ -41,7 +41,7 @@ public function resolve($message): callable
4141
4242 $ handler = $ this ->messageToHandlerMapping [$ messageKey ];
4343 if ($ this ->isCollectionOfHandlers ($ handler )) {
44- $ handler = new MessageHandlerCollection ($ handler );
44+ $ handler = new ChainHandler ($ handler );
4545 }
4646
4747 return $ handler ;
You can’t perform that action at this time.
0 commit comments