diff --git a/AwsS3V3Adapter.php b/AwsS3V3Adapter.php index 40174e1..c020335 100644 --- a/AwsS3V3Adapter.php +++ b/AwsS3V3Adapter.php @@ -407,6 +407,10 @@ private function retrievePaginatedListing(array $options): Generator public function move(string $source, string $destination, Config $config): void { + if ($source === $destination) { + return; + } + try { $this->copy($source, $destination, $config); $this->delete($source); @@ -417,6 +421,10 @@ public function move(string $source, string $destination, Config $config): void public function copy(string $source, string $destination, Config $config): void { + if ($source === $destination) { + return; + } + try { $visibility = $config->get(Config::OPTION_VISIBILITY); diff --git a/AwsS3V3AdapterTest.php b/AwsS3V3AdapterTest.php index 04daa66..d2fbb5c 100644 --- a/AwsS3V3AdapterTest.php +++ b/AwsS3V3AdapterTest.php @@ -81,7 +81,7 @@ protected function tearDown(): void protected function setUp(): void { - if (PHP_VERSION_ID < 801000) { + if (PHP_VERSION_ID < 80100) { $this->markTestSkipped('AWS does not support this anymore.'); }