File tree Expand file tree Collapse file tree 4 files changed +28
-5
lines changed
Expand file tree Collapse file tree 4 files changed +28
-5
lines changed Original file line number Diff line number Diff line change 22
33## NOT RELEASED
44
5+ ### Fixed
6+
7+ - Buffer the response in temporary file to avoid issues when stream is used by another request's body
8+
59## 1.27.1
610
711### Fixed
812
9- - SignerV4: fix sort of query parameters to build correct canoncal query string
13+ - SignerV4: fix sort of query parameters to build correct canoncal query string
1014
1115## 1.27.0
1216
Original file line number Diff line number Diff line change @@ -369,10 +369,6 @@ public function toStream(): ResultStream
369369 {
370370 $ this ->resolve ();
371371
372- if (\is_callable ([$ this ->httpResponse , 'toStream ' ])) {
373- return new ResponseBodyResourceStream ($ this ->httpResponse ->toStream ());
374- }
375-
376372 if ($ this ->streamStarted ) {
377373 throw new RuntimeException ('Can not create a ResultStream because the body started being downloaded. The body was started to be downloaded in Response::wait() ' );
378374 }
Original file line number Diff line number Diff line change 22
33## NOT RELEASED
44
5+ ### Fixed
6+
7+ - Add test to ensure a response's body can be streamed to another request's body.
8+
59### BC-BREAK
610
711- AWS api-change: Expires's property and its getters/setters switched from ` \DateTimeImmutable ` to ` string ` .
Original file line number Diff line number Diff line change @@ -1008,6 +1008,25 @@ public function testUploadPartCopy(): void
10081008 self ::assertEquals (200 , $ result ->info ()['status ' ]);
10091009 }
10101010
1011+ public function testStreamToStream (): void
1012+ {
1013+ $ client = $ this ->getClient ();
1014+
1015+ $ client ->putObject ([
1016+ 'Bucket ' => 'foo ' ,
1017+ 'Key ' => 'bar ' ,
1018+ 'Body ' => 'content ' ,
1019+ ])->resolve ();
1020+
1021+ $ client ->putObject ([
1022+ 'Bucket ' => 'foo ' ,
1023+ 'Key ' => 'bar2 ' ,
1024+ 'Body ' => $ client ->getObject (['Bucket ' => 'foo ' , 'Key ' => 'bar ' ])->getBody ()->getContentAsResource (),
1025+ ])->resolve ();
1026+
1027+ self ::expectNotToPerformAssertions ();
1028+ }
1029+
10111030 private function getClient (): S3Client
10121031 {
10131032 return new S3Client ([
You can’t perform that action at this time.
0 commit comments