Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
c6aa9bc1
Unverified
Commit
c6aa9bc1
authored
Jul 23, 2020
by
larowlan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#3158708
by catch: RouteProvider::getAllRoutes no longer returns an iterable, breaking BC
parent
5920411f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
core/lib/Drupal/Core/Routing/RouteProvider.php
core/lib/Drupal/Core/Routing/RouteProvider.php
+2
-1
core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php
...sts/Drupal/KernelTests/Core/Routing/RouteProviderTest.php
+1
-0
No files found.
core/lib/Drupal/Core/Routing/RouteProvider.php
View file @
c6aa9bc1
...
...
@@ -408,7 +408,8 @@ public function getAllRoutes() {
$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() {
$returned_routes
=
$provider
->
getAllRoutes
();
$this
->
assertInstanceOf
(
\
Iterator
::
class
,
$returned_routes
);
$this
->
assertEqual
(
$expected_route_count
,
count
(
$returned_routes
));
foreach
(
$returned_routes
as
$route_name
=>
$route
)
{
...
...
Write
Preview
Markdown
is supported
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