File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
DependencyInjection/Compiler Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 44
55use Symfony \Component \DependencyInjection \Compiler \CompilerPassInterface ;
66use Symfony \Component \DependencyInjection \ContainerBuilder ;
7+ use Symfony \Component \DependencyInjection \ContainerInterface ;
78use Symfony \Component \DependencyInjection \Reference ;
89
910/**
@@ -23,14 +24,15 @@ public function process(ContainerBuilder $container)
2324 if (!$ container ->has (self ::EVENT_DISPATCHER_SERVICE_ID )) {
2425 return ;
2526 }
26- $ eventDispatcherDefinition = $ container ->findDefinition (self ::EVENT_DISPATCHER_SERVICE_ID );
2727 $ taggedConsumers = $ container ->findTaggedServiceIds ('old_sound_rabbit_mq.base_amqp ' );
2828
2929 foreach ($ taggedConsumers as $ id => $ tag ) {
3030 $ definition = $ container ->getDefinition ($ id );
3131 $ definition ->addMethodCall (
3232 'setEventDispatcher ' ,
33- [$ eventDispatcherDefinition ]
33+ [
34+ new Reference (self ::EVENT_DISPATCHER_SERVICE_ID , ContainerInterface::IGNORE_ON_INVALID_REFERENCE )
35+ ]
3436 );
3537 }
3638
You can’t perform that action at this time.
0 commit comments