Problem/Motivation

The $name parameter for UrlGenerator::getRoute() is documented incorrectly. $name can be a string or an instance of SymfonyRoute.

Proposed resolution

Update the UrlGenerator::getRoute() docblock properly according to the Drupal API standards.

Remaining tasks

  • Provide a patch.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cilefen’s picture

Issue tags: +Documentation
joshi.rohit100’s picture

Status: Active » Needs review
FileSize
659 bytes
kfitz’s picture

FileSize
725 bytes

Created a new patch to correct the typos in #2.

cilefen’s picture

Status: Needs review » Needs work

The issue is for UrlGenerator::getRoute().

kfitz’s picture

FileSize
660 bytes

Made corrections from #4.

cilefen’s picture

+++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php
@@ -512,8 +512,8 @@ protected function processRoute($name, SymfonyRoute $route, array &$parameters,
+   *   Symfony route instance or the route name to fetch.

Let's make this "The Symfony route instance or the route name to fetch." and it will be ready to go.

kfitz’s picture

FileSize
664 bytes

Made alterations from #6.

cilefen’s picture

Status: Needs work » Reviewed & tested by the community

Thank you!

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php
@@ -512,8 +512,8 @@ protected function processRoute($name, SymfonyRoute $route, array &$parameters,
+   * @param \Symfony\Component\Routing\Route|string $name
+   *   The Symfony route instance or the route name to fetch.

I think this should be:

   * @param string|\Symfony\Component\Routing\Route $name
   *   The route name or a route object.

To match existing documentation in the interface.

joshi.rohit100’s picture

Status: Needs work » Needs review
FileSize
643 bytes

Status: Needs review » Needs work

The last submitted patch, 10: 2509694-10.patch, failed testing.

joshi.rohit100’s picture

So now documentation change causes test failure :)

Status: Needs work » Needs review

stefan.r queued 10: 2509694-10.patch for re-testing.

cilefen’s picture

Status: Needs review » Reviewed & tested by the community

As this is fixed according to #9, this is RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Docs are not frozen in beta. Committed f236f3e and pushed to 8.0.x. Thanks!

  • alexpott committed f236f3e on 8.0.x
    Issue #2509694 by kfitz, joshi.rohit100, cilefen: The $name parameter...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.