Skip to content

Commit 69e3531

Browse files
committed
bug #1112 [Live] array return on cache warmer (weaverryan)
This PR was merged into the 2.x branch. Discussion ---------- [Live] array return on cache warmer | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Tickets | None | License | MIT `warmUp` has a documented array return type, which will become a true return type in Symfony 7. Commits ------- 8cafe5a [Live] array return on cache warmer
2 parents 5d9bf16 + 8cafe5a commit 69e3531

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/LiveComponent/src/Twig/TemplateCacheWarmer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@ public function __construct(private \IteratorAggregate $templateIterator, privat
2626
{
2727
}
2828

29-
public function warmUp(string $cacheDir): void
29+
public function warmUp(string $cacheDir): array
3030
{
3131
$map = [];
3232
foreach ($this->templateIterator as $item) {
3333
$map[bin2hex(random_bytes(16))] = $item;
3434
}
3535

3636
(new PhpArrayAdapter($cacheDir.'/'.$this->cacheFilename, new NullAdapter()))->warmUp(['map' => $map]);
37+
38+
return [];
3739
}
3840

3941
public function isOptional(): bool

0 commit comments

Comments
 (0)