Problem/Motivation
#3158708: RouteProvider::getAllRoutes no longer returns an iterable, breaking BC fixed a BC break introduced in #2917331: Decouple from Symfony CMF that changed the return type for RouteProvider::getAllRoutes()
.
It used to return an Iterator. Then #2917331 changed it to an array. Then #3158708 changed it back.
However, the PHPDoc comment says:
* @return \Symfony\Component\Routing\Route[]
* An iterator of routes keyed by route name.
I thought []
meant an array, not an Iterator
. How do you tell the difference in PHPDoc comments?
Proposed resolution
Properly document RouteProvider::getAllRoutes()
that it returns an Iterator
, not an array.
Remaining tasks
Figure out how to properly document something that returns an Iterator in PHPDoc.Update the docs for RouteProvider::getAllRoutes() accordingly.- Reviews / refinements.
- RTBC.
- Commit.