diff options
author | MichaIng <micha@dietpi.com> | 2022-02-22 21:53:01 +0100 |
---|---|---|
committer | MichaIng <micha@dietpi.com> | 2022-02-22 23:07:16 +0100 |
commit | e4588a37d06f607776b731dd19ae862fbe91fe27 (patch) | |
tree | 5d48ee58c74160b679e0eb8274c8f20b4e1fa59c /build/integration/features | |
parent | a45f88106ce0912dbd537b0623f0f43b6e6ecadb (diff) | |
download | nextcloud-server-e4588a37d06f607776b731dd19ae862fbe91fe27.tar.gz nextcloud-server-e4588a37d06f607776b731dd19ae862fbe91fe27.zip |
Update GuzzleHttp function call for v7
https://github.com/guzzle/guzzle/issues/2824
Signed-off-by: MichaIng <micha@dietpi.com>
Diffstat (limited to 'build/integration/features')
4 files changed, 7 insertions, 7 deletions
diff --git a/build/integration/features/bootstrap/Avatar.php b/build/integration/features/bootstrap/Avatar.php index 56bf3b5da0f..6e59beeb7de 100644 --- a/build/integration/features/bootstrap/Avatar.php +++ b/build/integration/features/bootstrap/Avatar.php @@ -109,7 +109,7 @@ trait Avatar { * @param string $source */ public function loggedInUserPostsTemporaryAvatarFromFile(string $source) { - $file = \GuzzleHttp\Psr7\stream_for(fopen($source, 'r')); + $file = \GuzzleHttp\Psr7\Utils::streamFor(fopen($source, 'r')); $this->sendingAToWithRequesttoken('POST', '/index.php/avatar', [ diff --git a/build/integration/features/bootstrap/ChecksumsContext.php b/build/integration/features/bootstrap/ChecksumsContext.php index 75b9734e0aa..ae44fcb1503 100644 --- a/build/integration/features/bootstrap/ChecksumsContext.php +++ b/build/integration/features/bootstrap/ChecksumsContext.php @@ -79,7 +79,7 @@ class ChecksumsContext implements \Behat\Behat\Context\Context { * @param string $checksum */ public function userUploadsFileToWithChecksum($user, $source, $destination, $checksum) { - $file = \GuzzleHttp\Psr7\stream_for(fopen($source, 'r')); + $file = \GuzzleHttp\Psr7\Utils::streamFor(fopen($source, 'r')); try { $this->response = $this->client->put( $this->baseUrl . '/remote.php/webdav' . $destination, diff --git a/build/integration/features/bootstrap/FilesDropContext.php b/build/integration/features/bootstrap/FilesDropContext.php index d360f518968..a5d4dad14e3 100644 --- a/build/integration/features/bootstrap/FilesDropContext.php +++ b/build/integration/features/bootstrap/FilesDropContext.php @@ -51,7 +51,7 @@ class FilesDropContext implements Context, SnippetAcceptingContext { $options['headers'] = [ 'X-REQUESTED-WITH' => 'XMLHttpRequest' ]; - $options['body'] = \GuzzleHttp\Psr7\stream_for($content); + $options['body'] = \GuzzleHttp\Psr7\Utils::streamFor($content); try { $this->response = $client->request('PUT', $fullUrl, $options); diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php index 93602968fb1..3ea4831f42c 100644 --- a/build/integration/features/bootstrap/WebDav.php +++ b/build/integration/features/bootstrap/WebDav.php @@ -493,7 +493,7 @@ trait WebDav { * @param string $destination */ public function userUploadsAFileTo($user, $source, $destination) { - $file = \GuzzleHttp\Psr7\stream_for(fopen($source, 'r')); + $file = \GuzzleHttp\Psr7\Utils::streamFor(fopen($source, 'r')); try { $this->response = $this->makeDavRequest($user, "PUT", $destination, [], $file); } catch (\GuzzleHttp\Exception\ServerException $e) { @@ -525,7 +525,7 @@ trait WebDav { * @When User :user uploads file with content :content to :destination */ public function userUploadsAFileWithContentTo($user, $content, $destination) { - $file = \GuzzleHttp\Psr7\stream_for($content); + $file = \GuzzleHttp\Psr7\Utils::streamFor($content); try { $this->response = $this->makeDavRequest($user, "PUT", $destination, [], $file); } catch (\GuzzleHttp\Exception\ServerException $e) { @@ -583,7 +583,7 @@ trait WebDav { */ public function userUploadsChunkFileOfWithToWithChecksum($user, $num, $total, $data, $destination) { $num -= 1; - $data = \GuzzleHttp\Psr7\stream_for($data); + $data = \GuzzleHttp\Psr7\Utils::streamFor($data); $file = $destination . '-chunking-42-' . $total . '-' . $num; $this->makeDavRequest($user, 'PUT', $file, ['OC-Chunked' => '1'], $data, "uploads"); } @@ -654,7 +654,7 @@ trait WebDav { * @Given user :user uploads new chunk file :num with :data to id :id */ public function userUploadsNewChunkFileOfWithToId($user, $num, $data, $id) { - $data = \GuzzleHttp\Psr7\stream_for($data); + $data = \GuzzleHttp\Psr7\Utils::streamFor($data); $destination = '/uploads/' . $user . '/' . $id . '/' . $num; $this->makeDavRequest($user, 'PUT', $destination, [], $data, "uploads"); } |