Skip to content

Commit

Permalink
Allowed overwriting component id using tag property for RendererInter…
Browse files Browse the repository at this point in the history
…face::renderSingle
  • Loading branch information
Steveb-p committed Oct 9, 2023
1 parent 026e867 commit 942003a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bundle/DependencyInjection/Compiler/ComponentPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public function process(ContainerBuilder $container): void
if (!isset($tag['group'])) {
throw new InvalidArgumentException($id, 'Tag ' . self::TAG_NAME . ' must contain a "group" argument.');
}

$id = $tag['id'] ?? $id;
$registryDefinition->addMethodCall('addComponent', [$tag['group'], $id, $serviceReference]);
}
}
Expand Down

0 comments on commit 942003a

Please sign in to comment.