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.x] Fix Http::withCookies() #31745
Conversation
The CI fails because |
@SjorsO it only fails with this PR so we'd have to update the minimum version in this pr. |
I'm not very familiar with version constraints, would changing |
Yes. |
Please update the suggest blocks too (in all composer.json files). |
I've updated the suggest block for the HTTP client. I haven't updated the |
Please update all the suggest blocks, so the framework suggests the same version, across all the components. |
I've bumped all the ones I could find. Thanks for your help! |
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.
Looks good now. 👍
Uh, I don't want people to have to use a "CookieJar" - I just want to be able to pass an array. |
@taylorotwell If you give this method an array Guzzle will throw an exception. Which means that with the current type-hint, this method is unusable. ZTTP uses this method to re-use cookies between requests. |
@SjorsO you might want to accept the ref: https://github.com/guzzle/guzzle/blob/master/src/Cookie/CookieJar.php#L25 |
I thought about using |
Taylor pushed a new commit for this: 36d783c |
Currently,
Http::withCookies()
has an array typehint. If you give this method an array, it will throw this error:cookies must be an instance of GuzzleHttp\Cookie\CookieJarInterface
For reference, Zttp's withCookies method doesn't have a typehint.
Fixes #31750