Problem/Motivation

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

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

Steps to reproduce

Proposed resolution

Add the "RouteCollection" return type hint.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3233023-2.patch1.49 KBdaffie
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

daffie created an issue. See original summary.

daffie’s picture

Status: Active » Needs review
FileSize
1.49 KB

The fix.

daffie’s picture

I could only find 1 instance in contrib where the method was overridden. See: http://grep.xnddx.ru/node/30964662. Only that is a method with the same name and it does not implement the interface Symfony\Component\Routing\RouterInterface.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

RTBC based on the patch doing what is needed and the above research into contrib.

larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed 2596c3f and pushed to 9.3.x. Thanks!

  • larowlan committed 2596c3f on 9.3.x
    Issue #3233023 by daffie: [Symfony 6] Add "RouteCollection" type hint to...

Status: Fixed » Closed (fixed)

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