Skip to content

Commit 3a3eac3

Browse files
committed
Properly add tags to services
1 parent 767a215 commit 3a3eac3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/DependencyInjection/WebpackEncoreExtension.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ private function entrypointFactory(ContainerBuilder $container, string $name, st
8282
$name,
8383
$strictMode,
8484
];
85-
$container->setDefinition($id, new Definition(EntrypointLookup::class, $arguments));
85+
$definition = new Definition(EntrypointLookup::class, $arguments);
86+
$definition->addTag('kernel.reset', ['method'=>'reset']);
87+
$container->setDefinition($id, $definition);
8688

8789
return new Reference($id);
8890
}

src/Resources/config/services.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<service id="Symfony\WebpackEncoreBundle\Asset\EntrypointLookupCollectionInterface" alias="webpack_encore.entrypoint_lookup_collection" />
1515

1616
<service id="webpack_encore.tag_renderer" class="Symfony\WebpackEncoreBundle\Asset\TagRenderer">
17+
<tag name="kernel.reset" method="reset" />
1718
<argument type="service" id="webpack_encore.entrypoint_lookup_collection" />
1819
<argument type="service" id="assets.packages" />
1920
<argument type="collection" />

0 commit comments

Comments
 (0)