Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#2 | 3233023-2.patch | 1.49 KB | daffie |
Comments
Comment #2
daffie CreditAttribution: daffie commentedThe fix.
Comment #3
daffie CreditAttribution: daffie commentedI 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
.Comment #4
longwaveRTBC based on the patch doing what is needed and the above research into contrib.
Comment #5
larowlanCommitted 2596c3f and pushed to 9.3.x. Thanks!