Skip to content

Commit a9d0834

Browse files
committed
Merge branch '4.1'
* 4.1: [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 d0090f1 + 03594b7 commit a9d0834

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
@@ -101,6 +101,13 @@ public function createRequest(Request $request, $path)
101101
$newRequest->attributes->set(Security::LAST_USERNAME, $request->attributes->get(Security::LAST_USERNAME));
102102
}
103103

104+
if ($request->get('_format')) {
105+
$newRequest->attributes->set('_format', $request->get('_format'));
106+
}
107+
if ($request->getDefaultLocale() !== $request->getLocale()) {
108+
$newRequest->setLocale($request->getLocale());
109+
}
110+
104111
return $newRequest;
105112
}
106113

0 commit comments

Comments
 (0)