[FrameworkBundle] Add parameter types from HttpKernel.

This commit is contained in:
Alexander M. Turek 2019-08-14 10:20:07 +02:00
parent b64fdb7c0a
commit 9408a07dd9
7 changed files with 10 additions and 17 deletions

View File

@ -43,7 +43,7 @@ abstract class AbstractPhpFileCacheWarmer implements CacheWarmerInterface
/**
* {@inheritdoc}
*/
public function warmUp($cacheDir)
public function warmUp(string $cacheDir)
{
$arrayAdapter = new ArrayAdapter();

View File

@ -35,11 +35,9 @@ class RouterCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterf
}
/**
* Warms up the cache.
*
* @param string $cacheDir The cache directory
* {@inheritdoc}
*/
public function warmUp($cacheDir)
public function warmUp(string $cacheDir)
{
$router = $this->container->get('router');

View File

@ -36,7 +36,7 @@ class TranslationsCacheWarmer implements CacheWarmerInterface, ServiceSubscriber
/**
* {@inheritdoc}
*/
public function warmUp($cacheDir)
public function warmUp(string $cacheDir)
{
if (null === $this->translator) {
$this->translator = $this->container->get('translator');

View File

@ -40,19 +40,14 @@ class HttpCache extends BaseHttpCache
}
/**
* Forwards the Request to the backend and returns the Response.
*
* @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
* {@inheritdoc}
*/
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()->getContainer()->set('cache', $this);
return parent::forward($request, $raw, $entry);
return parent::forward($request, $catch, $entry);
}
/**

View File

@ -74,7 +74,7 @@ class Router extends BaseRouter implements WarmableInterface, ServiceSubscriberI
/**
* {@inheritdoc}
*/
public function warmUp($cacheDir)
public function warmUp(string $cacheDir)
{
$currentDir = $this->getOption('cache_dir');

View File

@ -88,7 +88,7 @@ class Translator extends BaseTranslator implements WarmableInterface
/**
* {@inheritdoc}
*/
public function warmUp($cacheDir)
public function warmUp(string $cacheDir)
{
// skip warmUp when translator doesn't use cache
if (null === $this->options['cache_dir']) {

View File

@ -23,7 +23,7 @@
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/error-renderer": "^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/filesystem": "^4.4|^5.0",
"symfony/finder": "^4.4|^5.0",