Skip to content

Commit 792a14a

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 51a9180 + 904fd3f commit 792a14a

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
@@ -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)