Skip to content

Commit dc5d8f9

Browse files
committed
Update warmup signature on all WarmableInterface implementations
Signed-off-by: Quentin Devos <4972091+Okhoshi@users.noreply.github.com>
1 parent 36fe555 commit dc5d8f9

File tree

13 files changed

+33
-13
lines changed

13 files changed

+33
-13
lines changed

src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ public function isOptional(): bool
4040
}
4141

4242
/**
43+
* @param string|null $buildDir directory to put generated source code that can be marked as read-only at runtime.
44+
* The directory is not provided when only cache_dir should be warmed up.
4345
* @return string[] A list of files to preload on PHP 7.4+
4446
*/
45-
public function warmUp(string $cacheDir): array
47+
public function warmUp(string $cacheDir /* , string $buildDir = null */): array
4648
{
4749
$files = [];
4850
foreach ($this->registry->getManagers() as $em) {

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AbstractPhpFileCacheWarmer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ public function isOptional(): bool
3535
}
3636

3737
/**
38+
* @param string|null $buildDir directory to put generated source code that can be marked as read-only at runtime.
39+
* The directory is not provided when only cache_dir should be warmed up.
3840
* @return string[] A list of classes to preload on PHP 7.4+
3941
*/
40-
public function warmUp(string $cacheDir): array
42+
public function warmUp(string $cacheDir /* , string $buildDir = null */): array
4143
{
4244
$arrayAdapter = new ArrayAdapter();
4345

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/CachePoolClearerCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(Psr6CacheClearer $poolClearer, array $pools = [])
4040
/**
4141
* @return string[]
4242
*/
43-
public function warmUp(string $cacheDirectory): array
43+
public function warmUp(string $cacheDirectory, string $buildDir = null): array
4444
{
4545
foreach ($this->pools as $pool) {
4646
if ($this->poolClearer->hasPool($pool)) {

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ public function __construct(ContainerInterface $container)
3434
$this->container = $container;
3535
}
3636

37-
public function warmUp(string $cacheDir): array
37+
/**
38+
* @param string|null $buildDir directory to put generated source code that can be marked as read-only at runtime.
39+
* The directory is not provided when only cache_dir should be warmed up.
40+
*/
41+
public function warmUp(string $cacheDir /* , string $buildDir = null */): array
3842
{
3943
$router = $this->container->get('router');
4044

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TranslationsCacheWarmer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ public function __construct(ContainerInterface $container)
3434
}
3535

3636
/**
37+
* @param string|null $buildDir directory to put generated source code that can be marked as read-only at runtime.
38+
* The directory is not provided when only cache_dir should be warmed up.
3739
* @return string[]
3840
*/
39-
public function warmUp(string $cacheDir): array
41+
public function warmUp(string $cacheDir /* , string $buildDir = null */): array
4042
{
4143
$this->translator ??= $this->container->get('translator');
4244

src/Symfony/Bundle/FrameworkBundle/Routing/Router.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ public function getRouteCollection(): RouteCollection
8181
}
8282

8383
/**
84+
* @param string|null $buildDir directory to put generated source code that can be marked as read-only at runtime.
85+
* The directory is not provided when only cache_dir should be warmed up.
8486
* @return string[] A list of classes to preload on PHP 7.4+
8587
*/
86-
public function warmUp(string $cacheDir): array
88+
public function warmUp(string $cacheDir /* , string $buildDir = null */): array
8789
{
8890
$currentDir = $this->getOption('cache_dir');
8991

src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/Fixture/TestAppKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function isOptional(): bool
5252
return false;
5353
}
5454

55-
public function warmUp(string $cacheDir): array
55+
public function warmUp(string $cacheDir, string $buildDir = null): array
5656
{
5757
file_put_contents($cacheDir.'/dummy.txt', 'Hello');
5858

src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ public function __construct(ContainerInterface $container, MessageFormatterInter
9595
}
9696

9797
/**
98+
* @param string|null $buildDir directory to put generated source code that can be marked as read-only at runtime.
99+
* The directory is not provided when only cache_dir should be warmed up.
98100
* @return string[]
99101
*/
100-
public function warmUp(string $cacheDir): array
102+
public function warmUp(string $cacheDir /* , string $buildDir = null */): array
101103
{
102104
// skip warmUp when translator doesn't use cache
103105
if (null === $this->options['cache_dir']) {

src/Symfony/Bundle/SecurityBundle/CacheWarmer/ExpressionCacheWarmer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ public function isOptional(): bool
3535
}
3636

3737
/**
38+
* @param string|null $buildDir directory to put generated source code that can be marked as read-only at runtime.
39+
* The directory is not provided when only cache_dir should be warmed up.
3840
* @return string[]
3941
*/
40-
public function warmUp(string $cacheDir): array
42+
public function warmUp(string $cacheDir /* , string $buildDir = null */): array
4143
{
4244
foreach ($this->expressions as $expression) {
4345
$this->expressionLanguage->parse($expression, ['token', 'user', 'object', 'subject', 'role_names', 'request', 'trust_resolver']);

src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ public function __construct(ContainerInterface $container, iterable $iterator)
3636
}
3737

3838
/**
39+
* @param string|null $buildDir directory to put generated source code that can be marked as read-only at runtime.
40+
* The directory is not provided when only cache_dir should be warmed up.
3941
* @return string[] A list of template files to preload on PHP 7.4+
4042
*/
41-
public function warmUp(string $cacheDir): array
43+
public function warmUp(string $cacheDir /* , string $buildDir = null */): array
4244
{
4345
$this->twig ??= $this->container->get('twig');
4446

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy