Skip to content

Commit c0687cd

Browse files
committed
remove() should not use deprecated getParent() so it does not trigger deprecation internally
1 parent 708c0d3 commit c0687cd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Component/Routing/RouteCollection.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,10 @@ public function get($name)
163163
public function remove($name)
164164
{
165165
// just for BC
166-
$root = $this->getRoot();
166+
$root = $this;
167+
while ($root->parent) {
168+
$root = $root->parent;
169+
}
167170

168171
foreach ((array) $name as $n) {
169172
unset($root->routes[$n]);

0 commit comments

Comments
 (0)