]> source.dussan.org Git - nextcloud-server.git/commitdiff
Update GuzzleHttp function call for v7 30210/head
authorMichaIng <micha@dietpi.com>
Tue, 22 Feb 2022 20:53:01 +0000 (21:53 +0100)
committerMichaIng <micha@dietpi.com>
Tue, 22 Feb 2022 22:07:16 +0000 (23:07 +0100)
https://github.com/guzzle/guzzle/issues/2824

Signed-off-by: MichaIng <micha@dietpi.com>
build/integration/features/bootstrap/Avatar.php
build/integration/features/bootstrap/ChecksumsContext.php
build/integration/features/bootstrap/FilesDropContext.php
build/integration/features/bootstrap/WebDav.php

index 56bf3b5da0f50eb5253343e9425f0d77f136b7dd..6e59beeb7de92728f1bbd5ac49c42ac69a3dd778 100644 (file)
@@ -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',
                        [
index 75b9734e0aaed8643f34e0725c7bb96cc01404d6..ae44fcb15034c860acb0f7a2e813fb07d12a1dfc 100644 (file)
@@ -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,
index d360f518968924efefd3643d5918b5509e2797fc..a5d4dad14e3df98f2930bfc6cc73f2cc5d36f2e8 100644 (file)
@@ -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);
index 93602968fb1a160eb28743f37c219030edd58978..3ea4831f42cabb64029e9eedf7028fda1e1a0649 100644 (file)
@@ -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");
        }