Skip to content

Some cleanup and added PSR7 as requirement #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
}
],
"require": {
"php": "^7.0"
"php": "^7.0",
"psr/http-message": "^1.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/ClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ 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
* Every technically correct HTTP response MUST be returned as is, even if it represents a HTTP
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im sure I copied it right, but I think I agree with you on the grammar.

https://github.com/php-fig/fig-standards/blob/master/proposed/http-client/http-client.md#clientinterface

I do not think it is a blocker for the package. Could you please correct this at the specification?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done #1006

* error response or a redirect instruction. The only special case is 1xx responses, which MUST
* be assembled in the HTTP client.
*
Expand All @@ -25,7 +25,7 @@ interface ClientInterface
*
* @return ResponseInterface
*
* @throws \Psr\Http\Client\Exception If an error happens during processing the request.
* @throws \Psr\Http\Client\ClientException If an error happens during processing the request.
*/
public function sendRequest(RequestInterface $request): ResponseInterface;
}
6 changes: 3 additions & 3 deletions src/Exception/RequestException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace Psr\Http\Client\Exception;

use Psr\Http\Message\RequestInterface;
use Psr\Http\Client\ClientException;
use Psr\Http\Message\RequestInterface;

/**
* Exception for when a request failed.
*
* Examples:
* - Request is invalid (eg. method is missing)
* - Runtime request errors (like the body stream is not seekable)
* - Request is invalid (e.g. method is missing)
* - Runtime request errors (e.g. the body stream is not seekable)
*/
interface RequestException extends ClientException
{
Expand Down