Skip to content

Commit

Permalink
find definition by alias too
Browse files Browse the repository at this point in the history
  • Loading branch information
yceruto committed Aug 21, 2024
1 parent ebb91de commit 464299f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function process(ContainerBuilder $container): void

foreach ($refs as $ref) {
/** @var class-string $handlerClass */
$handlerClass = $container->getDefinition((string) $ref)->getClass();
$handlerClass = $container->findDefinition((string) $ref)->getClass();

if (null === $refHandlerClass = $container->getReflectionClass($handlerClass)) {
throw new LogicException('Missing reflection class.');
Expand All @@ -66,7 +66,7 @@ public function process(ContainerBuilder $container): void

foreach ($attributes as $attribute) {
$instance = $attribute->newInstance();
$decorator = $container->getDefinition($instance->id);
$decorator = $container->findDefinition($instance->id);
/** @var class-string $decoratorClass */
$decoratorClass = $decorator->getClass();

Expand Down

0 comments on commit 464299f

Please sign in to comment.