8000 [Routing] removed an optimization as it does not always work as expected · brki/symfony@c536797 · GitHub
[go: up one dir, main page]

Skip to content

Commit c536797

Browse files
committed
[Routing] removed an optimization as it does not always work as expected
1 parent 968cc75 commit c536797

File tree

3 files changed

+0
-5
lines changed

3 files changed

+0
-5
lines changed

src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ private function compileRoutes(RouteCollection $routes, $supportsRedirections, $
125125
}
126126

127127
if ($optimizable && $prefix !== $parentPrefix) {
128-
$code[] = " throw 0 < count(\$allow) ? new MethodNotAllowedException(array_unique(\$allow)) : new ResourceNotFoundException();";
129128
$code[] = " }\n";
130129
}
131130
} else {

tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ public function match($pathinfo)
125125
return $matches;
126126
}
127127

128-
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
129128
}
130129

131130
// ababa
@@ -139,7 +138,6 @@ public function match($pathinfo)
139138
return $matches;
140139
}
141140

142-
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
143141
}
144142

145143
// foo

tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher2.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ public function match($pathinfo)
137137
return $matches;
138138
}
139139

140-
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
141140
}
142141

143142
// ababa
@@ -151,7 +150,6 @@ public function match($pathinfo)
151150
return $matches;
152151
}
153152

154-
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
155153
}
156154

157155
// foo

0 commit comments

Comments
 (0)
0