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
[7.0] Avoid functions due to global install conflicts #2546
Conversation
I like this PR. But you have kept the functions. That means there could still be conflicts, right? |
I kept them to make sure that upgrading to guzzle 7 is easy. We should deprecate in 7.1.0, and remove in 8.0.0, perhaps? |
There will be no conflicts within the internals, at least, so upgrading to Guzzle 7 won't result in Guzzle 7 calling globally installed guzzle 6 functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
use GuzzleHttp\Handler\StreamHandler; | ||
use Psr\Http\Message\UriInterface; | ||
|
||
final class Utils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please me more defensive here.
Mark it as @internal
and write a comment to explain the intent of the class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this class is internal only? We do intend for people to call these class methods, instead of the functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, It is just me that want to get rid of the functions AND eventually this class.
We can discuss that in a separate PR or issue.
Don't call the GuzzleHttp "functions"; instead use class static methods. The functions themselves could be marked as deprecated in 7.1.0.
This is the full version of #2548, which was only applied to the new internal functions added on or after 6.4.0, which are directly causing problems for people.