diff --git a/src/Symfony/Bridge/Twig/Command/LintCommand.php b/src/Symfony/Bridge/Twig/Command/LintCommand.php index d2f7542af7435..9ea2ff7eb69a7 100644 --- a/src/Symfony/Bridge/Twig/Command/LintCommand.php +++ b/src/Symfony/Bridge/Twig/Command/LintCommand.php @@ -107,7 +107,7 @@ private function getFilesInfo(array $filenames) return $filesInfo; } - protected function findFiles($filename) + protected function findFiles(string $filename) { if (is_file($filename)) { return [$filename]; diff --git a/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php b/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php index be4c56d83033f..9de093676ba80 100644 --- a/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php +++ b/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php @@ -38,7 +38,7 @@ public function __construct(ContainerInterface $container, iterable $iterator) /** * {@inheritdoc} */ - public function warmUp($cacheDir) + public function warmUp(string $cacheDir) { if (null === $this->twig) { $this->twig = $this->container->get('twig'); diff --git a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php index c0b175c3a2ed8..277c6a19fa03d 100644 --- a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php +++ b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php @@ -42,7 +42,7 @@ protected function configure() ; } - protected function findFiles($filename) + protected function findFiles(string $filename) { if (0 === strpos($filename, '@')) { $dir = $this->getApplication()->getKernel()->locateResource($filename); diff --git a/src/Symfony/Bundle/TwigBundle/Controller/PreviewErrorController.php b/src/Symfony/Bundle/TwigBundle/Controller/PreviewErrorController.php index bc15a968e9c15..27e0fde84dc45 100644 --- a/src/Symfony/Bundle/TwigBundle/Controller/PreviewErrorController.php +++ b/src/Symfony/Bundle/TwigBundle/Controller/PreviewErrorController.php @@ -37,7 +37,7 @@ public function __construct(HttpKernelInterface $kernel, $controller, ErrorRende $this->errorRenderer = $errorRenderer; } - public function previewErrorPageAction(Request $request, $code) + public function previewErrorPageAction(Request $request, int $code) { $exception = FlattenException::createFromThrowable(new \Exception('Something has intentionally gone wrong.'), $code, ['X-Debug' => false]); diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php index 836f53267df21..a5cda2de5cd64 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php @@ -170,7 +170,7 @@ private function getBundleTemplatePaths(ContainerBuilder $container, array $conf return $bundleHierarchy; } - private function normalizeBundleName($name) + private function normalizeBundleName(string $name) { if ('Bundle' === substr($name, -6)) { $name = substr($name, 0, -6); diff --git a/src/Symfony/Bundle/TwigBundle/composer.json b/src/Symfony/Bundle/TwigBundle/composer.json index 387bc6f8143b4..f497406a022a7 100644 --- a/src/Symfony/Bundle/TwigBundle/composer.json +++ b/src/Symfony/Bundle/TwigBundle/composer.json @@ -19,9 +19,9 @@ "php": "^7.2.9", "symfony/config": "^4.4|^5.0", "symfony/error-renderer": "^4.4|^5.0", - "symfony/twig-bridge": "^4.4|^5.0", + "symfony/twig-bridge": "^5.0", "symfony/http-foundation": "^4.4|^5.0", - "symfony/http-kernel": "^4.4|^5.0", + "symfony/http-kernel": "^5.0", "symfony/polyfill-ctype": "~1.8", "twig/twig": "^2.10" },