php-graphql-client icon indicating copy to clipboard operation
php-graphql-client copied to clipboard

Cast the stream to string instead of getting the contents

Open gisostallenberg opened this issue 3 years ago • 5 comments

PHP FIG PSR-7 describes getContents as "Returns the remaining contents in a string", while the interface description mentions "[...] including serialization of the entire stream to a string.". For some implementations of PSR-7 the stream is not rewinded and thus getContents turns out to be an empty string in some cases. Also see https://github.com/php-fig/http-message/blob/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4/src/StreamInterface.php#L136-L143 and https://github.com/Nyholm/psr7/issues/135#issuecomment-546593859.

gisostallenberg avatar Nov 17 '21 14:11 gisostallenberg

@mghoneimy This seems a very trivial PR. Although I understand this might be a project you just handle in your spare time (of which I do not know how much you have) I hope you can spend some time on approving the workflow to be run and checking this PR.

gisostallenberg avatar Nov 26 '21 15:11 gisostallenberg

@mghoneimy could you respond to this PR?

gisostallenberg avatar Apr 05 '22 14:04 gisostallenberg

Seems to be abandoned. I will better use another library.

saschaende avatar Jul 05 '22 22:07 saschaende

Hello @saschaende :wave:

From Jul 6th and until now. Did you actually end up going with another library? If so, which one, if I may ask?

eiriksm avatar Nov 05 '23 20:11 eiriksm

Hello @saschaende 👋

From Jul 6th and until now. Did you actually end up going with another library? If so, which one, if I may ask?

REST (!!!)

saschaende avatar Nov 06 '23 00:11 saschaende