diff --git a/core/lib/Drupal/Core/Routing/AccessAwareRouter.php b/core/lib/Drupal/Core/Routing/AccessAwareRouter.php index 4ee519cee0..13f685f8aa 100644 --- a/core/lib/Drupal/Core/Routing/AccessAwareRouter.php +++ b/core/lib/Drupal/Core/Routing/AccessAwareRouter.php @@ -51,6 +51,16 @@ public function __construct(RouteProviderInterface $route_provider, CurrentPathS $this->account = $account; } + /** + * {@inheritdoc} + */ + public function __call($name, $arguments) { + @trigger_error('The method ' . __METHOD__ . '() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. No replacement, use direct method call instead. See https://www.drupal.org/node/2915905', E_USER_DEPRECATED); + + // Ensure to call every other function to the router. + return call_user_func_array([$this, $name], $arguments); + } + /** * {@inheritdoc} *