diff --git a/core/lib/Drupal/Core/Routing/RouteProvider.php b/core/lib/Drupal/Core/Routing/RouteProvider.php index e621f236a5..c3303968c2 100644 --- a/core/lib/Drupal/Core/Routing/RouteProvider.php +++ b/core/lib/Drupal/Core/Routing/RouteProvider.php @@ -460,9 +460,12 @@ public function getRoutesPaged($offset, $length = NULL) { } /** - * {@inheritdoc} + * Gets the total count of routes provided by the router. + * + * @deprecated in drupal:9.1.0 and is removed from drupal:10.0.0 */ public function getRoutesCount() { + @trigger_error(__CLASS__ . '::getRoutesCount() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0', E_USER_DEPRECATED); return $this->connection->query("SELECT COUNT(*) FROM {" . $this->connection->escapeTable($this->tableName) . "}")->fetchField(); } diff --git a/core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php b/core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php index d31338cbac..2c631f8278 100644 --- a/core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php +++ b/core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php @@ -133,14 +133,17 @@ public function reset() { * @deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. */ public function getRoutesPaged($offset, $length = NULL) { - @trigger_error(__CLASS__ . '::getRoutesPaged is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0', E_USER_DEPRECATED); + @trigger_error(__CLASS__ . '::getRoutesPaged() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0', E_USER_DEPRECATED); return $this->getRouteProvider()->getRoutesPaged($offset, $length); } /** - * {@inheritdoc} + * Gets the total count of routes provided by the router. + * + * @deprecated in drupal:9.1.0 and is removed from drupal:10.0.0 */ public function getRoutesCount() { + @trigger_error(__CLASS__ . '::getRoutesCount() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0', E_USER_DEPRECATED); return $this->getRouteProvider()->getRoutesCount(); } diff --git a/core/tests/Drupal/KernelTests/RouteProvider.php b/core/tests/Drupal/KernelTests/RouteProvider.php index 872e4ed981..f075dbae0d 100644 --- a/core/tests/Drupal/KernelTests/RouteProvider.php +++ b/core/tests/Drupal/KernelTests/RouteProvider.php @@ -91,11 +91,4 @@ public function reset() { return $this->lazyLoadItself()->reset(); } - /** - * {@inheritdoc} - */ - public function getRoutesCount() { - return $this->lazyLoadItself()->getRoutesCount(); - } - }