From 3583ac0dda7012541afc79ee1f0f4ef20c2a17ae Mon Sep 17 00:00:00 2001 From: Joel Wurtz Date: Mon, 9 Jul 2018 11:57:11 +0200 Subject: [PATCH] Remove internal deprecation notice --- src/Encoding/CompressStream.php | 6 +++++- src/Encoding/DecompressStream.php | 6 +++++- src/Encoding/DeflateStream.php | 6 +++++- src/Encoding/GzipDecodeStream.php | 6 +++++- src/Encoding/GzipEncodeStream.php | 6 +++++- src/Encoding/InflateStream.php | 6 +++++- 6 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/Encoding/CompressStream.php b/src/Encoding/CompressStream.php index d1013dc..eeec6e0 100644 --- a/src/Encoding/CompressStream.php +++ b/src/Encoding/CompressStream.php @@ -2,6 +2,7 @@ namespace Http\Message\Encoding; +use Clue\StreamFilter as Filter; use Psr\Http\Message\StreamInterface; /** @@ -21,7 +22,10 @@ public function __construct(StreamInterface $stream, $level = -1) throw new \RuntimeException('The zlib extension must be enabled to use this stream'); } - parent::__construct($stream, ['window' => 15, 'level' => $level], ['window' => 15]); + parent::__construct($stream, ['window' => 15, 'level' => $level]); + + // @deprecated will be removed in 2.0 + $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 15]); } /** diff --git a/src/Encoding/DecompressStream.php b/src/Encoding/DecompressStream.php index 4e3a723..9a950ea 100644 --- a/src/Encoding/DecompressStream.php +++ b/src/Encoding/DecompressStream.php @@ -2,6 +2,7 @@ namespace Http\Message\Encoding; +use Clue\StreamFilter as Filter; use Psr\Http\Message\StreamInterface; /** @@ -21,7 +22,10 @@ public function __construct(StreamInterface $stream, $level = -1) throw new \RuntimeException('The zlib extension must be enabled to use this stream'); } - parent::__construct($stream, ['window' => 15], ['window' => 15, 'level' => $level]); + parent::__construct($stream, ['window' => 15]); + + // @deprecated will be removed in 2.0 + $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 15, 'level' => $level]); } /** diff --git a/src/Encoding/DeflateStream.php b/src/Encoding/DeflateStream.php index 1d7344b..f7ce8e2 100644 --- a/src/Encoding/DeflateStream.php +++ b/src/Encoding/DeflateStream.php @@ -2,6 +2,7 @@ namespace Http\Message\Encoding; +use Clue\StreamFilter as Filter; use Psr\Http\Message\StreamInterface; /** @@ -17,7 +18,10 @@ class DeflateStream extends FilteredStream */ public function __construct(StreamInterface $stream, $level = -1) { - parent::__construct($stream, ['window' => -15, 'level' => $level], ['window' => -15]); + parent::__construct($stream, ['window' => -15, 'level' => $level]); + + // @deprecated will be removed in 2.0 + $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => -15]); } /** diff --git a/src/Encoding/GzipDecodeStream.php b/src/Encoding/GzipDecodeStream.php index 4f958ed..19a2b8f 100644 --- a/src/Encoding/GzipDecodeStream.php +++ b/src/Encoding/GzipDecodeStream.php @@ -2,6 +2,7 @@ namespace Http\Message\Encoding; +use Clue\StreamFilter as Filter; use Psr\Http\Message\StreamInterface; /** @@ -21,7 +22,10 @@ public function __construct(StreamInterface $stream, $level = -1) throw new \RuntimeException('The zlib extension must be enabled to use this stream'); } - parent::__construct($stream, ['window' => 31], ['window' => 31, 'level' => $level]); + parent::__construct($stream, ['window' => 31]); + + // @deprecated will be removed in 2.0 + $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 31, 'level' => $level]); } /** diff --git a/src/Encoding/GzipEncodeStream.php b/src/Encoding/GzipEncodeStream.php index 1066eec..8555d4a 100644 --- a/src/Encoding/GzipEncodeStream.php +++ b/src/Encoding/GzipEncodeStream.php @@ -2,6 +2,7 @@ namespace Http\Message\Encoding; +use Clue\StreamFilter as Filter; use Psr\Http\Message\StreamInterface; /** @@ -21,7 +22,10 @@ public function __construct(StreamInterface $stream, $level = -1) throw new \RuntimeException('The zlib extension must be enabled to use this stream'); } - parent::__construct($stream, ['window' => 31, 'level' => $level], ['window' => 31]); + parent::__construct($stream, ['window' => 31, 'level' => $level]); + + // @deprecated will be removed in 2.0 + $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 31]); } /** diff --git a/src/Encoding/InflateStream.php b/src/Encoding/InflateStream.php index 7070230..863b73d 100644 --- a/src/Encoding/InflateStream.php +++ b/src/Encoding/InflateStream.php @@ -2,6 +2,7 @@ namespace Http\Message\Encoding; +use Clue\StreamFilter as Filter; use Psr\Http\Message\StreamInterface; /** @@ -21,7 +22,10 @@ public function __construct(StreamInterface $stream, $level = -1) throw new \RuntimeException('The zlib extension must be enabled to use this stream'); } - parent::__construct($stream, ['window' => -15], ['window' => -15, 'level' => $level]); + parent::__construct($stream, ['window' => -15]); + + // @deprecated will be removed in 2.0 + $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => -15, 'level' => $level]); } /**