Verified Commit c6aa9bc1 authored by larowlan's avatar larowlan
Browse files

Issue #3158708 by catch: RouteProvider::getAllRoutes no longer returns an iterable, breaking BC

parent 5920411f
...@@ -408,7 +408,8 @@ public function getAllRoutes() { ...@@ -408,7 +408,8 @@ public function getAllRoutes() {
$result[$name] = unserialize($route); $result[$name] = unserialize($route);
} }
return $result; $array_object = new \ArrayObject($result);
return $array_object->getIterator();
} }
/** /**
......
...@@ -311,6 +311,7 @@ public function testGetAllRoutes() { ...@@ -311,6 +311,7 @@ public function testGetAllRoutes() {
$returned_routes = $provider->getAllRoutes(); $returned_routes = $provider->getAllRoutes();
$this->assertInstanceOf(\Iterator::class, $returned_routes);
$this->assertEqual($expected_route_count, count($returned_routes)); $this->assertEqual($expected_route_count, count($returned_routes));
foreach ($returned_routes as $route_name => $route) { foreach ($returned_routes as $route_name => $route) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment