Skip to content

Commit 84e4928

Browse files
committed
minor fixes
1 parent 0ede1ee commit 84e4928

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/TwigComponent/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ then you're all set. Otherwise, register the service and tag it with
8181

8282
Step 2 is to create a template for this component. By default,
8383
templates live in `templates/components/{Component Name}.html.twig`,
84-
where `{Component Name}` is whatever you set as the `TwigComponent`
85-
attribute's `name` parameter:
84+
where `{Component Name}` is whatever you passed as the first argument
85+
to the `AsTwigComponent` class attribute:
8686

8787
```twig
8888
{# templates/components/alert.html.twig #}

src/TwigComponent/src/DependencyInjection/Compiler/TwigComponentPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function process(ContainerBuilder $container): void
3333
foreach (array_keys($container->findTaggedServiceIds('twig.component')) as $id) {
3434
$componentDefinition = $container->findDefinition($id);
3535

36-
$attributes = (new \ReflectionClass($componentDefinition->getClass()))
36+
$attributes = $container->getReflectionClass($componentDefinition->getClass())
3737
->getAttributes(AsTwigComponent::class, \ReflectionAttribute::IS_INSTANCEOF)
3838
;
3939

0 commit comments

Comments
 (0)