Skip to content

Commit 1bfe572

Browse files
Merge branch '3.4' into 4.0
* 3.4: (22 commits) [DI] Add tests for EnvVarProcessor [Bridge\PhpUnit] Fix #26430 Cannot autoload listeners Make sure we always render errors. Eventhough labels are disabled Make sure form errors is valid HTML [HttpKernel] Allow generators in registerBundle [TwigBundle] document TwigRenderer BC break in UPGRADE-3.4 Extra line to bootstrap 3 horizontal layout [Serializer] Remove const override Update Client.php [PhpUnitBridge] Ability to use different composer.json file [DomCrawler] FormField: remove an useless return statement [Config] ReflectionClassResource check abstract ServiceSubscriberInterface and EventSubscriberInterface Display the Welcome Page when there is no homepage defined fix regression when extending the Container class without a constructor fix the updating of timestamp in the MemcachedSessionHandler [SecurityBundle] Make extra character non mandatory in regex [Config] Add characters to the regex bumped Symfony version to 3.4.7 updated VERSION for 3.4.6 updated CHANGELOG for 3.4.6 ...
2 parents 19cf57f + b40f67f commit 1bfe572

File tree

9 files changed

+33
-6
lines changed

9 files changed

+33
-6
lines changed

Matcher/Dumper/PhpMatcherDumper.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,10 @@ private function compileRoutes(RouteCollection $routes, $supportsRedirections)
153153
}
154154
}
155155

156-
if ('' === $code) {
157-
$code .= " if ('/' === \$pathinfo) {\n";
158-
$code .= " throw new Symfony\Component\Routing\Exception\NoConfigurationException();\n";
159-
$code .= " }\n";
160-
}
156+
// used to display the Welcome Page in apps that don't define a homepage
157+
$code .= " if ('/' === \$pathinfo) {\n";
158+
$code .= " throw new Symfony\Component\Routing\Exception\NoConfigurationException();\n";
159+
$code .= " }\n";
161160

162161
return $code;
163162
}

Matcher/UrlMatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function match($pathinfo)
7676
return $ret;
7777
}
7878

79-
if (0 === count($this->routes) && '/' === $pathinfo) {
79+
if ('/' === $pathinfo) {
8080
throw new NoConfigurationException();
8181
}
8282

Tests/Fixtures/dumper/url_matcher1.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ public function match($rawPathinfo)
309309

310310
}
311311

312+
if ('/' === $pathinfo) {
313+
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
314+
}
315+
312316
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
313317
}
314318
}

Tests/Fixtures/dumper/url_matcher2.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,10 @@ public function match($rawPathinfo)
371371
}
372372
not_nonsecure:
373373

374+
if ('/' === $pathinfo) {
375+
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
376+
}
377+
374378
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
375379
}
376380
}

Tests/Fixtures/dumper/url_matcher3.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ public function match($rawPathinfo)
4646
return array('_route' => 'with-condition');
4747
}
4848

49+
if ('/' === $pathinfo) {
50+
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
51+
}
52+
4953
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
5054
}
5155
}

Tests/Fixtures/dumper/url_matcher4.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ public function match($rawPathinfo)
103103

104104
}
105105

106+
if ('/' === $pathinfo) {
107+
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
108+
}
109+
106110
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
107111
}
108112
}

Tests/Fixtures/dumper/url_matcher5.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ public function match($rawPathinfo)
200200

201201
}
202202

203+
if ('/' === $pathinfo) {
204+
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
205+
}
206+
203207
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
204208
}
205209
}

Tests/Fixtures/dumper/url_matcher6.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ public function match($rawPathinfo)
204204

205205
}
206206

207+
if ('/' === $pathinfo) {
208+
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
209+
}
210+
207211
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
208212
}
209213
}

Tests/Fixtures/dumper/url_matcher7.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ public function match($rawPathinfo)
240240

241241
}
242242

243+
if ('/' === $pathinfo) {
244+
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
245+
}
246+
243247
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
244248
}
245249
}

0 commit comments

Comments
 (0)