From 0fd911e47209e87b8f524c7a3f00f939fe20dc45 Mon Sep 17 00:00:00 2001 From: Nyholm Date: Tue, 30 Oct 2018 23:07:45 +0100 Subject: [PATCH] Updated interfaces from specification --- src/ClientExceptionInterface.php | 4 ++-- src/ClientInterface.php | 11 ----------- src/NetworkExceptionInterface.php | 2 +- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/ClientExceptionInterface.php b/src/ClientExceptionInterface.php index 575c51b..aa0b9cf 100644 --- a/src/ClientExceptionInterface.php +++ b/src/ClientExceptionInterface.php @@ -3,8 +3,8 @@ namespace Psr\Http\Client; /** - * Every HTTP client related Exception MUST implement this interface. + * Every HTTP client related exception MUST implement this interface. */ interface ClientExceptionInterface extends \Throwable { -} \ No newline at end of file +} diff --git a/src/ClientInterface.php b/src/ClientInterface.php index 36883e7..ad99fd4 100644 --- a/src/ClientInterface.php +++ b/src/ClientInterface.php @@ -10,17 +10,6 @@ interface ClientInterface /** * Sends a PSR-7 request and returns a PSR-7 response. * - * Every technically correct HTTP response MUST be returned as-is, even if it represents an HTTP - * error response or a redirect instruction. The only special case is 1xx responses, which MUST - * be assembled in the HTTP client. - * - * The client MAY do modifications to the Request before sending it. Because PSR-7 objects are - * immutable, one cannot assume that the object passed to ClientInterface::sendRequest() will be the same - * object that is actually sent. For example, the Request object that is returned by an exception MAY - * be a different object than the one passed to sendRequest, so comparison by reference (===) is not possible. - * - * {@link https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message-meta.md#why-value-objects} - * * @param RequestInterface $request * * @return ResponseInterface diff --git a/src/NetworkExceptionInterface.php b/src/NetworkExceptionInterface.php index ac66250..4a11627 100644 --- a/src/NetworkExceptionInterface.php +++ b/src/NetworkExceptionInterface.php @@ -21,4 +21,4 @@ interface NetworkExceptionInterface extends ClientExceptionInterface * @return RequestInterface */ public function getRequest(): RequestInterface; -} \ No newline at end of file +}