From af1eed92c216809beda9dfd66ddc7c33546f009b Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 27 Mar 2017 16:57:37 +0200 Subject: [PATCH] [HttpFoundation] Fix bad merge --- .../Component/HttpFoundation/Response.php | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index d34b8b148e..ca8535161a 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -185,29 +185,6 @@ class Response 510 => 'Not Extended', // RFC2774 511 => 'Network Authentication Required', // RFC6585 ); - private static $deprecatedMethods = array( - 'setDate', 'getDate', - 'setExpires', 'getExpires', - 'setLastModified', 'getLastModified', - 'setProtocolVersion', 'getProtocolVersion', - 'setStatusCode', 'getStatusCode', - 'setCharset', 'getCharset', - 'setPrivate', 'setPublic', - 'getAge', 'getMaxAge', 'setMaxAge', 'setSharedMaxAge', - 'getTtl', 'setTtl', 'setClientTtl', - 'getEtag', 'setEtag', - 'hasVary', 'getVary', 'setVary', - 'isInvalid', 'isSuccessful', 'isRedirection', - 'isClientError', 'isOk', 'isForbidden', - 'isNotFound', 'isRedirect', 'isEmpty', - ); - private static $deprecationsTriggered = array( - __CLASS__ => true, - BinaryFileResponse::class => true, - JsonResponse::class => true, - RedirectResponse::class => true, - StreamedResponse::class => true, - ); /** * Constructor. @@ -225,23 +202,6 @@ class Response $this->setStatusCode($status); $this->setProtocolVersion('1.0'); - // Deprecations - $class = get_class($this); - if ($this instanceof \PHPUnit_Framework_MockObject_MockObject || $this instanceof \Prophecy\Doubler\DoubleInterface) { - $class = get_parent_class($class); - } - if (isset(self::$deprecationsTriggered[$class])) { - return; - } - - self::$deprecationsTriggered[$class] = true; - foreach (self::$deprecatedMethods as $method) { - $r = new \ReflectionMethod($class, $method); - if (__CLASS__ !== $r->getDeclaringClass()->getName()) { - @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); - } - } - /* RFC2616 - 14.18 says all Responses need to have a Date */ if (!$this->headers->has('Date')) { $this->setDate(new \DateTime(null, new \DateTimeZone('UTC')));