[FrameworkBundle] Add parameter types from HttpKernel.
This commit is contained in:
parent
b64fdb7c0a
commit
9408a07dd9
@ -43,7 +43,7 @@ abstract class AbstractPhpFileCacheWarmer implements CacheWarmerInterface
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function warmUp($cacheDir)
|
public function warmUp(string $cacheDir)
|
||||||
{
|
{
|
||||||
$arrayAdapter = new ArrayAdapter();
|
$arrayAdapter = new ArrayAdapter();
|
||||||
|
|
||||||
|
@ -35,11 +35,9 @@ class RouterCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterf
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Warms up the cache.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @param string $cacheDir The cache directory
|
|
||||||
*/
|
*/
|
||||||
public function warmUp($cacheDir)
|
public function warmUp(string $cacheDir)
|
||||||
{
|
{
|
||||||
$router = $this->container->get('router');
|
$router = $this->container->get('router');
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ class TranslationsCacheWarmer implements CacheWarmerInterface, ServiceSubscriber
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function warmUp($cacheDir)
|
public function warmUp(string $cacheDir)
|
||||||
{
|
{
|
||||||
if (null === $this->translator) {
|
if (null === $this->translator) {
|
||||||
$this->translator = $this->container->get('translator');
|
$this->translator = $this->container->get('translator');
|
||||||
|
@ -40,19 +40,14 @@ class HttpCache extends BaseHttpCache
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forwards the Request to the backend and returns the Response.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @param bool $raw Whether to catch exceptions or not
|
|
||||||
* @param Response $entry A Response instance (the stale entry if present, null otherwise)
|
|
||||||
*
|
|
||||||
* @return Response A Response instance
|
|
||||||
*/
|
*/
|
||||||
protected function forward(Request $request, $raw = false, Response $entry = null)
|
protected function forward(Request $request, bool $catch = false, Response $entry = null)
|
||||||
{
|
{
|
||||||
$this->getKernel()->boot();
|
$this->getKernel()->boot();
|
||||||
$this->getKernel()->getContainer()->set('cache', $this);
|
$this->getKernel()->getContainer()->set('cache', $this);
|
||||||
|
|
||||||
return parent::forward($request, $raw, $entry);
|
return parent::forward($request, $catch, $entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,7 +74,7 @@ class Router extends BaseRouter implements WarmableInterface, ServiceSubscriberI
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function warmUp($cacheDir)
|
public function warmUp(string $cacheDir)
|
||||||
{
|
{
|
||||||
$currentDir = $this->getOption('cache_dir');
|
$currentDir = $this->getOption('cache_dir');
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ class Translator extends BaseTranslator implements WarmableInterface
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function warmUp($cacheDir)
|
public function warmUp(string $cacheDir)
|
||||||
{
|
{
|
||||||
// skip warmUp when translator doesn't use cache
|
// skip warmUp when translator doesn't use cache
|
||||||
if (null === $this->options['cache_dir']) {
|
if (null === $this->options['cache_dir']) {
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
"symfony/dependency-injection": "^4.4|^5.0",
|
"symfony/dependency-injection": "^4.4|^5.0",
|
||||||
"symfony/error-renderer": "^4.4|^5.0",
|
"symfony/error-renderer": "^4.4|^5.0",
|
||||||
"symfony/http-foundation": "^4.4|^5.0",
|
"symfony/http-foundation": "^4.4|^5.0",
|
||||||
"symfony/http-kernel": "^4.4|^5.0",
|
"symfony/http-kernel": "^5.0",
|
||||||
"symfony/polyfill-mbstring": "~1.0",
|
"symfony/polyfill-mbstring": "~1.0",
|
||||||
"symfony/filesystem": "^4.4|^5.0",
|
"symfony/filesystem": "^4.4|^5.0",
|
||||||
"symfony/finder": "^4.4|^5.0",
|
"symfony/finder": "^4.4|^5.0",
|
||||||
|
Reference in New Issue
Block a user