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
RequestException - check if readable before access #2081
RequestException - check if readable before access #2081
Conversation
@sagikazarmark anything I can do here? |
@SpacePossum sorry for the late response. This seems to be a proper patch, although (as you also said) it lacks tests which would be nice before merging. I believe a seekable, non-readable stream is perfectly valid (eg. you just want to write content, but never read from the same stream, maybe it's a file that will be read by some other process). |
thanks @sagikazarmark for the response, much appreciated :) |
Thanks @SpacePossum Sorry for blocking the PR, but I would prefer if you could make some changes in the tests. Thanks! |
@sagikazarmark thanks for the review, I've updated the test, let me know what you think when you the time, no rush :) |
Unfortunately anonymous classes are not supported on PHP 5.6 and we still provide support for that version sadly. |
I've updated the test to support PHP 5.6 |
@sagikazarmark thanks for the pointers, all green now :D |
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
thanks @Nyholm let me know if there is anything left for me to do here, ❤️ to see this in :) |
Lets wait for Mark to give his final blessing. |
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.
LGTM, thanks a lot!
Great work. Thank you. |
thanks @Nyholm and @sagikazarmark :D |
Hello @SpacePossum, i create a fork of this repo and release this marge request into the new version(6.4.0). Namespace compatibility is 100%, and you can use my changes if you patch composer.json in your projects
Fork link: https://github.com/SomeBlackMagic/guzzle/ |
Thanks @wirwolf ! I do hope this fix gets shipped with the regular |
It is. We will release a new version later today. |
nice :) thanks so much! |
Hi all!
Thanks for the great package :)
First time PR so please bear with me ;)
I target master here because the issue is not on 5.x or lower it seems.
In my project I attempted to do download file by doing something like:
currently this results in
with this patch:
I haven't made a unit test yet because I'm wondering if the proposed solution is the correct one. I've my doubts that is OK if a
Stream
isSeekable
but yet notisReadable
. So maybe this needs to be solved within theStream
class itself (isSeekable
always returnsfalse
if notisReadable
) or maybe theStream
is not created correctly?Some meta data;
let me know what you guys think :)