Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
c6aa9bc1
Verified
Commit
c6aa9bc1
authored
Jul 23, 2020
by
larowlan
Browse files
Issue
#3158708
by catch: RouteProvider::getAllRoutes no longer returns an iterable, breaking BC
parent
5920411f
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Core/Routing/RouteProvider.php
View file @
c6aa9bc1
...
@@ -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
();
}
}
/**
/**
...
...
core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php
View file @
c6aa9bc1
...
@@ -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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment