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
PoC for PSR-17 #2525
base: 7.5
Are you sure you want to change the base?
PoC for PSR-17 #2525
Conversation
I have updated the description. If possible I would like some comments :) |
I find it weird that we encourage people to use standards like PSR-17, but we also suggest using our What's the point in using PSR-17 then? People will hardly use an entirely different PSR-7/PSR-17 package with our options. |
I will revert this.. Most probably ppl will not use PSR-7/PSR-17/PSR-18 if they have to build a request in a verbose way when they can simply use Extracting |
FYI about a year ago I've found it very difficult to get the team working with PSR clientes because they are too verbose, so I ended up creating a wrapper https://gist.github.com/gnumoksha/b35d97613dd729315d3dc1ba0449544a |
Nice. :P That code is an example of where the new ClientTrait could be used. ;) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 2 weeks if no further activity occurs. Thank you for your contributions. |
Will try to re-initiate this. Thanks @GrahamCampbell .. Please give me an ETA of 5 days.. if you don't hear from me please proceed with any other implementation |
Current PR is only meant for discussion. It's purpose is not to be merged.
The main goals of this are the following:
How:
The biggest change here is that we extract
applyOptions
function into a separate function. By extracting the applyOptions to a separate function developers are able to create classes like in the following example:in order to support this we need to merge #1890
After merging this it will allow us to remove these three lines of codes: https://github.com/guzzle/guzzle/pull/2525/files#diff-ff73e042e738204c6da009e2ed19f783L161
These options are re-applied twice and they might have a performance impact since we are initializing two Streams, when user passes body as an option.
Related mentions before:
#1914
#1886
#2186 (comment)