From 40f069b9a34ef2370948cad3974f04adf406d282 Mon Sep 17 00:00:00 2001 From: Sean O'Brien Date: Mon, 14 Aug 2023 16:04:28 -0400 Subject: [PATCH] updates based on feedback, also maple --- src/S3/BucketEndpointArnMiddleware.php | 3 --- src/S3/StreamWrapper.php | 5 +++-- tests/MiddlewareTest.php | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/S3/BucketEndpointArnMiddleware.php b/src/S3/BucketEndpointArnMiddleware.php index 00a88c5f20..aa3dae2228 100644 --- a/src/S3/BucketEndpointArnMiddleware.php +++ b/src/S3/BucketEndpointArnMiddleware.php @@ -192,9 +192,6 @@ private function generateAccessPointHost( $useFips = $this->config['use_fips_endpoint']->isUseFipsEndpoint(); $fipsString = $useFips ? "-fips" : ""; - $useFips = $this->config['use_fips_endpoint']->isUseFipsEndpoint(); - $fipsString = $useFips ? "-fips" : ""; - if ($arn instanceof OutpostsAccessPointArn) { $host .= '.' . $arn->getOutpostId() . '.s3-outposts'; } else if ($arn instanceof ObjectLambdaAccessPointArn) { diff --git a/src/S3/StreamWrapper.php b/src/S3/StreamWrapper.php index f9173fd431..b42b6c55a8 100644 --- a/src/S3/StreamWrapper.php +++ b/src/S3/StreamWrapper.php @@ -570,8 +570,9 @@ public function rename($path_from, $path_to) // Delete the original object $this->getClient()->deleteObject([ 'Bucket' => $partsFrom['Bucket'], - 'Key' => $partsFrom['Key'] - ] + $options); + 'Key' => $partsFrom['Key'], + ] + $options); + return true; }); } diff --git a/tests/MiddlewareTest.php b/tests/MiddlewareTest.php index e833d0c1dd..f1b6410bfb 100644 --- a/tests/MiddlewareTest.php +++ b/tests/MiddlewareTest.php @@ -54,7 +54,7 @@ public function testWrapsWithRetryMiddleware() $called = true; })); $handler = $list->resolve(); - $handler(new Command('foo'), new Request('GET', 'http://example.com')); + $handler(new Command('foo'), new Request('GET', 'http://exmaple.com')); Promise\Utils::queue()->run(); $this->assertTrue($called); }