Skip to content

Commit 03594b7

Browse files
committed
Merge branch '3.4' into 4.1
* 3.4: [Console] simplified code removed useless phpdoc improve docblocks around group sequences [Cache] prevent getting older entries when the version key is evicted [WebProfilerBundle] added a note in the README [Yaml] Skip parser test with root user [Filesystem] Skip tests on readable file when run with root user [FWBundle] Fix an error in WebTestCase::createClient's PHPDoc [HttpFoundation][Security] forward locale and format to subrequests [Console] Send the right exit code to console.terminate listeners [HttpFoundation] fix hidding warnings from session handlers Caching missed templates on cache warmup
2 parents 19184c7 + 792a14a commit 03594b7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

HttpUtils.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ public function createRequest(Request $request, $path)
9595
$newRequest->attributes->set(Security::LAST_USERNAME, $request->attributes->get(Security::LAST_USERNAME));
9696
}
9797

98+
if ($request->get('_format')) {
99+
$newRequest->attributes->set('_format', $request->get('_format'));
100+
}
101+
if ($request->getDefaultLocale() !== $request->getLocale()) {
102+
$newRequest->setLocale($request->getLocale());
103+
}
104+
98105
return $newRequest;
99106
}
100107

0 commit comments

Comments
 (0)