Skip to content

Commit b99f4c1

Browse files
committed
-
1 parent a901218 commit b99f4c1

File tree

5 files changed

+1
-9
lines changed

5 files changed

+1
-9
lines changed

src/Operation/DropCollection.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
use MongoDB\Exception\InvalidArgumentException;
2727
use MongoDB\Exception\UnsupportedException;
2828

29-
use function is_array;
30-
3129
/**
3230
* Operation for the drop command.
3331
*
@@ -89,8 +87,7 @@ public function execute(Server $server): void
8987
$server->executeWriteCommand($this->databaseName, $this->createCommand(), $this->createOptions());
9088
} catch (CommandException $e) {
9189
/* The server may return an error if the collection does not exist.
92-
* Check for an error code and return the command reply instead of
93-
* throwing. */
90+
* Ignore the exception to make the drop operation is idempotent */
9491
if ($e->getCode() === self::ERROR_CODE_NAMESPACE_NOT_FOUND) {
9592
return;
9693
}

src/Operation/DropDatabase.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
use MongoDB\Driver\WriteConcern;
2525
use MongoDB\Exception\InvalidArgumentException;
2626

27-
use function is_array;
28-
2927
/**
3028
* Operation for the dropDatabase command.
3129
*

src/Operation/DropIndexes.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
use MongoDB\Exception\InvalidArgumentException;
2626
use MongoDB\Exception\UnsupportedException;
2727

28-
use function is_array;
2928
use function is_integer;
3029

3130
/**

tests/Operation/DropCollectionFunctionalTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use MongoDB\Operation\InsertOne;
77
use MongoDB\Tests\CommandObserver;
88
use PHPUnit\Framework\Attributes\Depends;
9-
use PHPUnit\Framework\Attributes\DoesNotPerformAssertions;
109

1110
class DropCollectionFunctionalTest extends FunctionalTestCase
1211
{

tests/Operation/DropDatabaseTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public static function provideInvalidConstructorOptions()
1919
{
2020
return self::createOptionDataProvider([
2121
'session' => self::getInvalidSessionValues(),
22-
'typeMap' => self::getInvalidArrayValues(),
2322
'writeConcern' => self::getInvalidWriteConcernValues(),
2423
]);
2524
}

0 commit comments

Comments
 (0)