mirror of
https://github.com/friendica/friendica
synced 2025-04-28 19:44:23 +02:00
[Composer] Bump guzzlehttp/guzzle to version 7 to suppress deprecation notices
- Bump divineomega/password_exposed to version 3 to remove dependency on Guzzle version 6 - Add new ICanHandleHttpResponses->getBodyString method to solve inheritance mismatch with GuzzleHttp\Psr7\ResponseInterface->getBody return type
This commit is contained in:
parent
728130908e
commit
e8c256bcff
34 changed files with 450 additions and 381 deletions
|
@ -97,10 +97,9 @@ interface ICanHandleHttpResponses
|
|||
/**
|
||||
* Getter for body
|
||||
*
|
||||
* @see MessageInterface::getBody()
|
||||
* @return string
|
||||
*/
|
||||
public function getBody();
|
||||
public function getBodyString();
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
|
|
|
@ -271,7 +271,7 @@ class HttpClient implements ICanSendHttpRequests
|
|||
{
|
||||
$ret = $this->fetchFull($url, $accept_content, $timeout, $cookiejar);
|
||||
|
||||
return $ret->getBody();
|
||||
return $ret->getBodyString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -330,7 +330,7 @@ class CurlResult implements ICanHandleHttpResponses
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public function getBody(): string
|
||||
public function getBodyString(): string
|
||||
{
|
||||
return $this->body;
|
||||
}
|
||||
|
|
|
@ -163,8 +163,7 @@ class GuzzleResponse extends Response implements ICanHandleHttpResponses, Respon
|
|||
return $this->isTimeout;
|
||||
}
|
||||
|
||||
/// @todo - fix mismatching use of "getBody()" as string here and parent "getBody()" as streaminterface
|
||||
public function getBody(): string
|
||||
public function getBodyString(): string
|
||||
{
|
||||
return (string) parent::getBody();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue