aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2021-10-21 12:37:51 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2021-11-23 09:28:57 +0100
commit66bdda568a16bbbc5ca75c9fc2fd8e5f4f0f200e (patch)
tree4faa32ccd095db834ae08c2440365c31c0aaed11 /lib/private/Files
parentaf7bf98cbab882f8fa36c9551aef4bafd0e3495f (diff)
downloadnextcloud-server-66bdda568a16bbbc5ca75c9fc2fd8e5f4f0f200e.tar.gz
nextcloud-server-66bdda568a16bbbc5ca75c9fc2fd8e5f4f0f200e.zip
Fix Guzzle function calls
Since 1.7.0 and 2.0 these functions are turned into static methods. See https://github.com/guzzle/psr7#upgrading-from-function-api Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/Files')
-rw-r--r--lib/private/Files/ObjectStore/S3Signature.php4
-rw-r--r--lib/private/Files/ObjectStore/Swift.php6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/Files/ObjectStore/S3Signature.php b/lib/private/Files/ObjectStore/S3Signature.php
index 1e5ef697835..64b994bac22 100644
--- a/lib/private/Files/ObjectStore/S3Signature.php
+++ b/lib/private/Files/ObjectStore/S3Signature.php
@@ -137,7 +137,7 @@ class S3Signature implements SignatureInterface {
$modify['set_headers']['X-Amz-Security-Token'] = $token;
}
- return Psr7\modify_request($request, $modify);
+ return Psr7\Utils::modifyRequest($request, $modify);
}
private function signString($string, CredentialsInterface $credentials) {
@@ -201,7 +201,7 @@ class S3Signature implements SignatureInterface {
$query = $request->getUri()->getQuery();
if ($query) {
- $params = Psr7\parse_query($query);
+ $params = Psr7\Query::parse($query);
$first = true;
foreach ($this->signableQueryString as $key) {
if (array_key_exists($key, $params)) {
diff --git a/lib/private/Files/ObjectStore/Swift.php b/lib/private/Files/ObjectStore/Swift.php
index 3607eff5b29..a3c8d92f3d2 100644
--- a/lib/private/Files/ObjectStore/Swift.php
+++ b/lib/private/Files/ObjectStore/Swift.php
@@ -27,7 +27,7 @@ namespace OC\Files\ObjectStore;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\BadResponseException;
-use function GuzzleHttp\Psr7\stream_for;
+use GuzzleHttp\Psr7\Utils;
use Icewind\Streams\RetryWrapper;
use OCP\Files\NotFoundException;
use OCP\Files\ObjectStore\IObjectStore;
@@ -81,13 +81,13 @@ class Swift implements IObjectStore {
if (filesize($tmpFile) < SWIFT_SEGMENT_SIZE) {
$this->getContainer()->createObject([
'name' => $urn,
- 'stream' => stream_for($handle),
+ 'stream' => Utils::streamFor($handle),
'contentType' => $mimetype,
]);
} else {
$this->getContainer()->createLargeObject([
'name' => $urn,
- 'stream' => stream_for($handle),
+ 'stream' => Utils::streamFor($handle),
'segmentSize' => SWIFT_SEGMENT_SIZE,
'contentType' => $mimetype,
]);