Skip to content

Commit 69204cc

Browse files
committed
Allowed multiple tags with the same subscriber
1 parent a2be9b6 commit 69204cc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/LIN3S/SharedKernel/Infrastructure/Symfony/Bundle/DependencyInjection/Compiler/TacticianEventsBusPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private function loadAllSubscribers(ContainerBuilder $container) : void
6464
$taggedServices = $container->findTaggedServiceIds($this->subscriberTag);
6565

6666
foreach ($taggedServices as $id => $tags) {
67-
foreach ($tags as $attributes) {
67+
foreach ($tags as $key => $attributes) {
6868
if (!isset($attributes['subscribes_to'])) {
6969
throw new \Exception(sprintf(
7070
'"subscribes_to" parameter not found in %s service definition tagged with "%s"',
@@ -74,7 +74,7 @@ private function loadAllSubscribers(ContainerBuilder $container) : void
7474
}
7575

7676
$container->setDefinition(
77-
'tactician_event_subscriber.' . $id,
77+
'tactician_event_subscriber.' . $id . '_' . $key,
7878
new Definition(
7979
TacticianEventSubscriber::class,
8080
[new Reference($id)]

0 commit comments

Comments
 (0)