diff options
author | jenkins-bot <jenkins-bot@gerrit.wikimedia.org> | 2021-11-11 16:41:57 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@wikimedia.org> | 2021-11-11 16:41:57 +0000 |
commit | d45cab7c464ef09e83f9148b543bc9dfe3b8f491 (patch) | |
tree | d1d59d9dca1b6c000c1aef34648800bc85e85dd3 | |
parent | d4c92c6fd43888cd1591c3ef3dc8aaed167fb79b (diff) | |
parent | 2d27b46802d2320e4edb09abfee2008c97e75d38 (diff) |
Merge "Update deprecated Guzzle Psr7 function calls"main
-rw-r--r-- | includes/http/MWCallbackStream.php | 3 | ||||
-rw-r--r-- | includes/http/MwHttpRequestToResponseInterfaceAdapter.php | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/includes/http/MWCallbackStream.php b/includes/http/MWCallbackStream.php index f325c366b4da..2472f164ff6f 100644 --- a/includes/http/MWCallbackStream.php +++ b/includes/http/MWCallbackStream.php @@ -19,6 +19,7 @@ */ use GuzzleHttp\Psr7\StreamDecoratorTrait; +use GuzzleHttp\Psr7\Utils; use Psr\Http\Message\StreamInterface; /** @@ -38,7 +39,7 @@ class MWCallbackStream implements StreamInterface { private $callback; public function __construct( callable $cb ) { - $this->stream = GuzzleHttp\Psr7\stream_for(); + $this->stream = Utils::streamFor(); $this->callback = $cb; } diff --git a/includes/http/MwHttpRequestToResponseInterfaceAdapter.php b/includes/http/MwHttpRequestToResponseInterfaceAdapter.php index 3a547b30bd42..a4d5f2798066 100644 --- a/includes/http/MwHttpRequestToResponseInterfaceAdapter.php +++ b/includes/http/MwHttpRequestToResponseInterfaceAdapter.php @@ -3,11 +3,11 @@ declare( strict_types = 1 ); namespace MediaWiki\Http; +use GuzzleHttp\Psr7\Utils; use LogicException; use MWHttpRequest; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\StreamInterface; -use function GuzzleHttp\Psr7\stream_for; /** * @since 1.36 @@ -73,7 +73,7 @@ class MwHttpRequestToResponseInterfaceAdapter implements ResponseInterface { } public function getBody(): StreamInterface { - return stream_for( $this->mwHttpRequest->getContent() ); + return Utils::streamFor( $this->mwHttpRequest->getContent() ); } public function withBody( StreamInterface $body ): void { |