Merge "Update deprecated Guzzle Psr7 function calls"
This commit is contained in:
commit
d45cab7c46
2 changed files with 4 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue