Skip to content

Commit 04e063d

Browse files
Merge branch '4.0'
* 4.0: [Routing] Fix throwing NoConfigurationException instead of 405 [Security] Load the user before pre/post auth checks when needed [SecurityBundle] Add test for simple authentication config [WebProfilerBundle] fix version check [SecurityBundle] Add missing argument to security.authentication.provider.simple [Finder] fix tests
2 parents cf2694c + 0663036 commit 04e063d

17 files changed

+31
-16
lines changed

Matcher/Dumper/PhpMatcherDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ private function compileRoutes(RouteCollection $routes, bool $matchHost): string
194194
}
195195

196196
// used to display the Welcome Page in apps that don't define a homepage
197-
$code .= " if ('/' === \$pathinfo) {\n";
197+
$code .= " if ('/' === \$pathinfo && !\$allow) {\n";
198198
$code .= " throw new Symfony\Component\Routing\Exception\NoConfigurationException();\n";
199199
$code .= " }\n";
200200

Matcher/UrlMatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function match($pathinfo)
8888
return $ret;
8989
}
9090

91-
if ('/' === $pathinfo) {
91+
if ('/' === $pathinfo && !$this->allow) {
9292
throw new NoConfigurationException();
9393
}
9494

Tests/Fixtures/dumper/url_matcher0.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function match($rawPathinfo)
2626
$canonicalMethod = 'GET';
2727
}
2828

29-
if ('/' === $pathinfo) {
29+
if ('/' === $pathinfo && !$allow) {
3030
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
3131
}
3232

Tests/Fixtures/dumper/url_matcher1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public function match($rawPathinfo)
238238
$offset += strlen($m);
239239
}
240240
}
241-
if ('/' === $pathinfo) {
241+
if ('/' === $pathinfo && !$allow) {
242242
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
243243
}
244244

Tests/Fixtures/dumper/url_matcher10.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2821,7 +2821,7 @@ public function match($rawPathinfo)
28212821
$offset += strlen($m);
28222822
}
28232823
}
2824-
if ('/' === $pathinfo) {
2824+
if ('/' === $pathinfo && !$allow) {
28252825
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
28262826
}
28272827

Tests/Fixtures/dumper/url_matcher11.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private function doMatch(string $rawPathinfo, array &$allow = array(), array &$a
146146
$offset += strlen($m);
147147
}
148148
}
149-
if ('/' === $pathinfo) {
149+
if ('/' === $pathinfo && !$allow) {
150150
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
151151
}
152152

Tests/Fixtures/dumper/url_matcher12.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function match($rawPathinfo)
9191
$offset += strlen($m);
9292
}
9393
}
94-
if ('/' === $pathinfo) {
94+
if ('/' === $pathinfo && !$allow) {
9595
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
9696
}
9797

Tests/Fixtures/dumper/url_matcher13.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function match($rawPathinfo)
6060
$offset += strlen($m);
6161
}
6262
}
63-
if ('/' === $pathinfo) {
63+
if ('/' === $pathinfo && !$allow) {
6464
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
6565
}
6666

Tests/Fixtures/dumper/url_matcher2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ private function doMatch(string $rawPathinfo, array &$allow = array(), array &$a
275275
$offset += strlen($m);
276276
}
277277
}
278-
if ('/' === $pathinfo) {
278+
if ('/' === $pathinfo && !$allow) {
279279
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
280280
}
281281

Tests/Fixtures/dumper/url_matcher3.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function match($rawPathinfo)
103103
$offset += strlen($m);
104104
}
105105
}
106-
if ('/' === $pathinfo) {
106+
if ('/' === $pathinfo && !$allow) {
107107
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
108108
}
109109

0 commit comments

Comments
 (0)