Problem/Motivation

Method "Symfony\Component\Routing\Generator\UrlGeneratorInterface::generate()" will return "string" as of its next major version. Doing the same in implementation "Drupal\Core\Routing\Router" will be required when upgrading.

Method "Symfony\Component\Routing\Generator\UrlGeneratorInterface::generate()" will return "string" as of its next major version. Doing the same in implementation "Drupal\Core\Routing\AccessAwareRouter" will be required when upgrading.

Method "Symfony\Component\Routing\Generator\UrlGeneratorInterface::generate()" will return "string" as of its next major version. Doing the same in implementation "Drupal\Core\Routing\UrlGenerator" will be required when upgrading.

Method "Symfony\Component\Routing\Generator\UrlGeneratorInterface::generate()" will return "string" as of its next major version. Doing the same in implementation "Drupal\Core\Render\MetadataBubblingUrlGenerator" will be required when upgrading.

Steps to reproduce

Proposed resolution

Add the "string" return type hint.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3232895-2.patch3.05 KBdaffie

Comments

daffie created an issue. See original summary.

daffie’s picture

Status: Active » Needs review
Issue tags: +Drupal 10
StatusFileSize
new3.05 KB

The fix.

daffie’s picture

I could not find any instances where the method is overridden in contrib. See: http://grep.xnddx.ru/search?text=public+function+generate%28%24name%2C+%....

longwave’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed dfa9d9d and pushed to 9.3.x. Thanks!

  • alexpott committed dfa9d9d on 9.3.x
    Issue #3232895 by daffie: [Symfony 6] Add "string" type hint to methods...

Status: Fixed » Closed (fixed)

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