Skip to content

Commit 41a7062

Browse files
committed
minor #2451 [LiveComponent] Use container.build_hash instead of kernel.secret in CacheWarmer (dkarlovi, smnandre)
This PR was merged into the 2.x branch. Discussion ---------- [LiveComponent] Use container.build_hash instead of kernel.secret in CacheWarmer | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Issues | Fix #2419 | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Commits ------- 257f9d2 Revert changelog update fd1f745 Update CHANGELOG.md 2b31704 Update LiveComponentExtension.php 276a908 Update LiveComponentExtension.php
2 parents 68821ae + 257f9d2 commit 41a7062

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/LiveComponent/src/DependencyInjection/LiveComponentExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use Symfony\Component\DependencyInjection\Definition;
2323
use Symfony\Component\DependencyInjection\Extension\Extension;
2424
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
25+
use Symfony\Component\DependencyInjection\Parameter;
2526
use Symfony\Component\DependencyInjection\Reference;
2627
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
2728
use Symfony\UX\LiveComponent\ComponentValidator;
@@ -258,7 +259,7 @@ function (ChildDefinition $definition, AsLiveComponent $attribute) {
258259
->setArguments([
259260
new Reference('twig.template_iterator'),
260261
self::TEMPLATES_MAP_FILENAME,
261-
'%kernel.secret%',
262+
new Parameter('container.build_hash'),
262263
])
263264
->addTag('kernel.cache_warmer');
264265
}

0 commit comments

Comments
 (0)