Problem/Motivation

Method "Symfony\Component\Routing\RouteCollection::getIterator()" will return "\ArrayIterator" as of its next major version. Doing the same in child class "Drupal\Core\Routing\LazyRouteCollection" will be required when upgrading.
    1x in LazyRouteCollectionTest::testGetIterator from Drupal\Tests\Core\Routing

In #3232893: [Symfony 6] Add "ArrayIterator" type hint to the method Drupal\Core\Routing\LazyRouteCollection::getIterator() we added the return type hint to the method Drupal\Core\Routing\LazyRouteCollection::getIterator(), only a mocked method in the test Drupal\Tests\Core\Routing\LazyRouteCollectionTest still return an array.

Steps to reproduce

Proposed resolution

Fix the return value.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3238210-2.patch1.16 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.16 KB

The fix.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

  • catch committed 2adf822 on 9.3.x
    Issue #3238210 by daffie: The mocked method in Drupal\Tests\Core\Routing...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed 2adf822 and pushed to 9.3.x. Thanks!

Status: Fixed » Closed (fixed)

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