Skip to content

Commit

Permalink
fix(S3): Adjust usage of guzzle promise
Browse files Browse the repository at this point in the history
`Promise\promise_for` was deprecated and is now removed and replaced with the static API (`Create::promiseFor`).

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Jun 14, 2024
1 parent 00981f4 commit da4de81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/private/Files/ObjectStore/S3ConnectionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Aws\Exception\CredentialsException;
use Aws\S3\Exception\S3Exception;
use Aws\S3\S3Client;
use GuzzleHttp\Promise;
use GuzzleHttp\Promise\Create;
use GuzzleHttp\Promise\RejectedPromise;
use OCP\ICertificateManager;
use Psr\Log\LoggerInterface;
Expand Down Expand Up @@ -178,7 +178,7 @@ protected function paramCredentialProvider(): callable {
$secret = empty($this->params['secret']) ? null : $this->params['secret'];

if ($key && $secret) {
return Promise\promise_for(
return Create::promiseFor(
new Credentials($key, $secret)
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/ObjectStore/S3Signature.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function presign(
}
}

$queryString = http_build_query($query, null, '&', PHP_QUERY_RFC3986);
$queryString = http_build_query($query, '', '&', PHP_QUERY_RFC3986);

return $request->withUri($request->getUri()->withQuery($queryString));
}
Expand Down

0 comments on commit da4de81

Please sign in to comment.