8000 minor #22179 [HttpFoundation] Fix bad merge (nicolas-grekas) · symfony/symfony@195e464 · GitHub
[go: up one dir, main page]

Skip to content

Commit 195e464

Browse files
minor #22179 [HttpFoundation] Fix bad merge (nicolas-grekas)
This PR was merged into the 3.3-dev branch. Discussion ---------- [HttpFoundation] Fix bad merge | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Bad merge, code had been removed in #21465 Commits ------- af1eed9 [HttpFoundation] Fix bad merge
2 parents d5af0da + af1eed9 commit 195e464

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

src/Symfony/Component/HttpFoundation/Response.php

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -185,29 +185,6 @@ class Response
185185
510 => 'Not Extended', // RFC2774
186186
511 => 'Network Authentication Required', // RFC6585
187187
);
188-
private static $deprecatedMethods = array(
189-
'setDate', 'getDate',
190-
'setExpires', 'getExpires',
191-
'setLastModified', 'getLastModified',
192-
'setProtocolVersion', 'getProtocolVersion',
193-
'setStatusCode', 'getStatusCode',
194-
'setCharset', 'getCharset',
195-
'setPrivate', 'setPublic',
196-
'getAge', 'getMaxAge', 'setMaxAge', 'setSharedMaxAge',
197-
'getTtl', 'setTtl', 'setClientTtl',
198-
'getEtag', 'setEtag',
199-
'hasVary', 'getVary', 'setVary',
200-
'isInvalid', 'isSuccessful', 'isRedirection',
201-
'isClientError', 'isOk', 'isForbidden',
202-
'isNotFound', 'isRedirect', 'isEmpty',
203-
);
204-
private static $deprecationsTriggered = array(
205-
__CLASS__ => true,
206-
BinaryFileResponse::class => true,
207-
JsonResponse::class => true,
208-
RedirectResponse::class => true,
209-
StreamedResponse::class => true,
210-
);
211188

212189
/**
213190
* Constructor.
@@ -225,23 +202,6 @@ public function __construct($content = '', $status = 200, $headers = array())
225202
$this->setStatusCode($status);
226203
$this->setProtocolVersion('1.0');
227204

228-
// Deprecations
229-
$class = get_class($this);
230-
if ($this instanceof \PHPUnit_Framework_MockObject_MockObject || $this instanceof \Prophecy\Doubler\DoubleInterface) {
231-
$class = get_parent_class($class);
232-
}
233-
if (isset(self::$deprecationsTriggered[$class])) {
234-
return;
235-
}
236-
237-
self::$deprecationsTriggered[$class] = true;
238-
foreach (self::$deprecatedMethods as $method) {
239-
$r = new \ReflectionMethod($class, $method);
240-
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
241-
@trigger_error(sprintf('Extending %s::%s() in %s is deprecated since version 3.2 and won\'t be supported anymore in 4.0 as it will be final.', __CLASS__, $method, $class), E_USER_DEPRECATED);
242-
}
243-
}
244-
245205
/* RFC2616 - 14.18 says all Responses need to have a Date */
246206
if (!$this->headers->has('Date')) {
247207
$this->setDate(new \DateTime(null, new \DateTimeZone('UTC')));

0 commit comments

Comments
 (0)
0