Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 64517f4

Browse files
committed
Merge branch '2.8' into 3.4
* 2.8: improve docblocks around group sequences [WebProfilerBundle] added a note in the README [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 Caching missed templates on cache warmup
2 parents 1aac556 + d2d55b8 commit 64517f4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Http/HttpUtils.php

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

94+
if ($request->get('_format')) {
95+
$newRequest->attributes->set('_format', $request->get('_format'));
96+
}
97+
if ($request->getDefaultLocale() !== $request->getLocale()) {
98+
$newRequest->setLocale($request->getLocale());
99+
}
100+
94101
return $newRequest;
95102
}
96103

0 commit comments

Comments
 (0)