From 61b7e46ba070f3e014c4784cd9389b5b6d36bdd9 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Mon, 20 Sep 2021 11:52:01 +0100 Subject: [PATCH] Issue #3233041 by daffie: [Symfony 6] Add "array" type hint to methods overridding Symfony\Component\Routing\Matcher\UrlMatcherInterface::match() --- core/lib/Drupal/Core/Routing/AccessAwareRouter.php | 2 +- core/lib/Drupal/Core/Routing/AccessAwareRouterInterface.php | 2 +- core/lib/Drupal/Core/Routing/Router.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/lib/Drupal/Core/Routing/AccessAwareRouter.php b/core/lib/Drupal/Core/Routing/AccessAwareRouter.php index b8d8ea2817f4..b13006ca3f05 100644 --- a/core/lib/Drupal/Core/Routing/AccessAwareRouter.php +++ b/core/lib/Drupal/Core/Routing/AccessAwareRouter.php @@ -147,7 +147,7 @@ public function generate($name, $parameters = [], $referenceType = self::ABSOLUT * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException * Thrown when access checking failed. */ - public function match($pathinfo) { + public function match($pathinfo): array { return $this->matchRequest(Request::create($pathinfo)); } diff --git a/core/lib/Drupal/Core/Routing/AccessAwareRouterInterface.php b/core/lib/Drupal/Core/Routing/AccessAwareRouterInterface.php index 3d3047ab120f..a48a9063e59a 100644 --- a/core/lib/Drupal/Core/Routing/AccessAwareRouterInterface.php +++ b/core/lib/Drupal/Core/Routing/AccessAwareRouterInterface.php @@ -30,6 +30,6 @@ public function matchRequest(Request $request): array; * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException * Thrown when $access_check is enabled and access checking failed. */ - public function match($pathinfo); + public function match($pathinfo): array; } diff --git a/core/lib/Drupal/Core/Routing/Router.php b/core/lib/Drupal/Core/Routing/Router.php index cb3e5586f90c..87324a68a5b1 100644 --- a/core/lib/Drupal/Core/Routing/Router.php +++ b/core/lib/Drupal/Core/Routing/Router.php @@ -97,7 +97,7 @@ public function addRouteEnhancer(EnhancerInterface $route_enhancer) { /** * {@inheritdoc} */ - public function match($pathinfo) { + public function match($pathinfo): array { $request = Request::create($pathinfo); return $this->matchRequest($request); -- GitLab