Skip to content

Commit 7764c93

Browse files
committed
feature#8957 [HttpFoundation] added a way to override the Request class (fabpot)
This PR was merged into the master branch. Discussion ---------- [HttpFoundation] added a way to override the Request class | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #7461, #7453 | License | MIT | Doc PR | symfony/symfony-docs#3021 This is an alternative implementation for #7461. I've also reverted #7381 and #7390 as these changes are not needed anymore. Todo: - [ ] add some tests Commits ------- 464439d [HttpFoundation] added a way to override the Request class
2 parents 02f69c2 + 69fb846 commit 7764c93

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Fragment/InlineFragmentRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ protected function createSubRequest($uri, Request $request)
132132

133133
$server['REMOTE_ADDR'] = '127.0.0.1';
134134

135-
$subRequest = $request::create($uri, 'get', array(), $cookies, array(), $server);
135+
$subRequest = Request::create($uri, 'get', array(), $cookies, array(), $server);
136136
if ($request->headers->has('Surrogate-Capability')) {
137137
$subRequest->headers->set('Surrogate-Capability', $request->headers->get('Surrogate-Capability'));
138138
}

HttpCache/HttpCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ protected function invalidate(Request $request, $catch = false)
268268
// As per the RFC, invalidate Location and Content-Location URLs if present
269269
foreach (array('Location', 'Content-Location') as $header) {
270270
if ($uri = $response->headers->get($header)) {
271-
$subRequest = $request::create($uri, 'get', array(), array(), array(), $request->server->all());
271+
$subRequest = Request::create($uri, 'get', array(), array(), array(), $request->server->all());
272272

273273
$this->store->invalidate($subRequest);
274274
}

0 commit comments

Comments
 (0)