Skip to content
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

Added support for PSR18 #2122

Closed
wants to merge 1 commit into from
Closed

Added support for PSR18 #2122

wants to merge 1 commit into from

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Aug 13, 2018

I know this PR maybe premature for you and we may not be ready to drop PHP5 support. I'm soon about to open the official vote for PSR-18. And I wanted to show how it will effect Guzzle.

See the specification: https://github.com/php-fig/fig-standards/blob/master/proposed/http-client/http-client.md
Read the blog post: https://medium.com/php-fig/the-http-client-psr-9c2535132980

@jeremeamia
Copy link
Member

Seems pretty straightforward.

@Nyholm
Copy link
Member Author

Nyholm commented Aug 18, 2018

The voting for the working group is open. @jeremeamia, add your vote here: https://groups.google.com/forum/#!topic/php-fig/BsroPEZcr_M


use Psr\Http\Message\RequestInterface;

class InvalidRequestException extends \InvalidArgumentException implements \Psr\Http\Client\Exception\RequestException, GuzzleException
Copy link
Member

Choose a reason for hiding this comment

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

Maybe you could have a look on this #2163. If we could merge this PR you can have this exception extend that one.

@boesing
Copy link

boesing commented Sep 25, 2019

How about a satellite project for guzzle to support PSR-18 instead of directly integrating it here?
Something like guzzlehttp/guzzle-psr18 with just a decorator inside.

Could work like the decorators for zend-cache which provide either PSR-6 or PSR-16 support.
https://github.com/zendframework/zend-cache/tree/master/src/Psr/SimpleCache
https://github.com/zendframework/zend-cache/blob/master/src/Psr/SimpleCache/SimpleCacheDecorator.php

This wont force guzzle to make a major release to drop PHP 5 support and there will be an official solution for guzzle to be used with PSR-18.

@Nyholm Nyholm added this to the 7.0.0 milestone Oct 23, 2019
@Nyholm Nyholm mentioned this pull request Dec 7, 2019
@Nyholm
Copy link
Member Author

Nyholm commented Dec 8, 2019

This is merged in master.

@Nyholm Nyholm closed this Dec 8, 2019
@Nyholm Nyholm deleted the psr-18 branch December 8, 2019 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants