diff --git a/UPGRADE-2.0.md b/UPGRADE-2.0.md index 6014e7003..32d283659 100644 --- a/UPGRADE-2.0.md +++ b/UPGRADE-2.0.md @@ -9,6 +9,7 @@ UPGRADE FROM 1.x to 2.0 * The `MongoDB\Model\IndexInfo::isGeoHaystack` method has been removed. * The `maxScan`, `modifiers`, `oplogReplay`, and `snapshot` options for `find` and `findOne` operations have been removed. + * The `MongoDB\Operation\Executable` interface has been removed. GridFS ------ diff --git a/src/Command/ListCollections.php b/src/Command/ListCollections.php index f2fb2410f..d5a399e06 100644 --- a/src/Command/ListCollections.php +++ b/src/Command/ListCollections.php @@ -24,7 +24,6 @@ use MongoDB\Driver\Session; use MongoDB\Exception\InvalidArgumentException; use MongoDB\Model\CachingIterator; -use MongoDB\Operation\Executable; use function is_bool; use function is_integer; @@ -36,7 +35,7 @@ * @internal * @see https://mongodb.com/docs/manual/reference/command/listCollections/ */ -final class ListCollections implements Executable +final class ListCollections { /** * Constructs a listCollections command. @@ -94,7 +93,6 @@ public function __construct(private string $databaseName, private array $options * Execute the operation. * * @return CachingIterator - * @see Executable::execute() * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ public function execute(Server $server): CachingIterator diff --git a/src/Command/ListDatabases.php b/src/Command/ListDatabases.php index 7ceeb4206..2ce1c90f9 100644 --- a/src/Command/ListDatabases.php +++ b/src/Command/ListDatabases.php @@ -23,7 +23,6 @@ use MongoDB\Driver\Session; use MongoDB\Exception\InvalidArgumentException; use MongoDB\Exception\UnexpectedValueException; -use MongoDB\Operation\Executable; use function current; use function is_array; @@ -37,7 +36,7 @@ * @internal * @see https://mongodb.com/docs/manual/reference/command/listDatabases/ */ -final class ListDatabases implements Executable +final class ListDatabases { /** * Constructs a listDatabases command. @@ -93,7 +92,6 @@ public function __construct(private array $options = []) /** * Execute the operation. * - * @see Executable::execute() * @return array An array of database info structures * @throws UnexpectedValueException if the command response was malformed * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/Aggregate.php b/src/Operation/Aggregate.php index b7f109589..0588df188 100644 --- a/src/Operation/Aggregate.php +++ b/src/Operation/Aggregate.php @@ -47,7 +47,7 @@ * @see \MongoDB\Collection::aggregate() * @see https://mongodb.com/docs/manual/reference/command/aggregate/ */ -final class Aggregate implements Executable, Explainable +final class Aggregate implements Explainable { private bool $isWrite; @@ -212,7 +212,6 @@ public function __construct(private string $databaseName, private ?string $colle /** * Execute the operation. * - * @see Executable::execute() * @throws UnexpectedValueException if the command response was malformed * @throws UnsupportedException if read concern or write concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/BulkWrite.php b/src/Operation/BulkWrite.php index 178ff1847..411c9d24d 100644 --- a/src/Operation/BulkWrite.php +++ b/src/Operation/BulkWrite.php @@ -46,7 +46,7 @@ * * @see \MongoDB\Collection::bulkWrite() */ -final class BulkWrite implements Executable +final class BulkWrite { public const DELETE_MANY = 'deleteMany'; public const DELETE_ONE = 'deleteOne'; @@ -185,7 +185,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @throws UnsupportedException if write concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/Count.php b/src/Operation/Count.php index df91214bd..d79d49447 100644 --- a/src/Operation/Count.php +++ b/src/Operation/Count.php @@ -41,7 +41,7 @@ * @see \MongoDB\Collection::count() * @see https://mongodb.com/docs/manual/reference/command/count/ */ -final class Count implements Executable, Explainable +final class Count implements Explainable { /** * Constructs a count command. @@ -124,7 +124,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @throws UnexpectedValueException if the command response was malformed * @throws UnsupportedException if read concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/CountDocuments.php b/src/Operation/CountDocuments.php index 4badaaf3b..7d00e8bed 100644 --- a/src/Operation/CountDocuments.php +++ b/src/Operation/CountDocuments.php @@ -37,7 +37,7 @@ * @see \MongoDB\Collection::countDocuments() * @see https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#countdocuments */ -final class CountDocuments implements Executable +final class CountDocuments { private array $aggregateOptions; @@ -103,7 +103,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @throws UnexpectedValueException if the command response was malformed * @throws UnsupportedException if collation or read concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/CreateCollection.php b/src/Operation/CreateCollection.php index 6411d1d2e..0e7918f37 100644 --- a/src/Operation/CreateCollection.php +++ b/src/Operation/CreateCollection.php @@ -41,7 +41,7 @@ * @see \MongoDB\Database::createCollection() * @see https://mongodb.com/docs/manual/reference/command/create/ */ -final class CreateCollection implements Executable +final class CreateCollection { public const USE_POWER_OF_2_SIZES = 1; public const NO_PADDING = 2; @@ -239,7 +239,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @return array|object Command result document * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/CreateEncryptedCollection.php b/src/Operation/CreateEncryptedCollection.php index fec5f2d18..7c1075c29 100644 --- a/src/Operation/CreateEncryptedCollection.php +++ b/src/Operation/CreateEncryptedCollection.php @@ -48,7 +48,7 @@ * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.rst#create-encrypted-collection-helper * @see https://www.mongodb.com/docs/manual/core/queryable-encryption/fundamentals/manage-collections/ */ -final class CreateEncryptedCollection implements Executable +final class CreateEncryptedCollection { private const WIRE_VERSION_FOR_QUERYABLE_ENCRYPTION_V2 = 21; @@ -155,7 +155,6 @@ public function createDataKeys(ClientEncryption $clientEncryption, string $kmsPr } /** - * @see Executable::execute() * @return array|object Command result document from creating the encrypted collection * @throws DriverRuntimeException for other driver errors (e.g. connection errors) * @throws UnsupportedException if the server does not support Queryable Encryption diff --git a/src/Operation/CreateIndexes.php b/src/Operation/CreateIndexes.php index 0b164c48c..6591270b7 100644 --- a/src/Operation/CreateIndexes.php +++ b/src/Operation/CreateIndexes.php @@ -41,7 +41,7 @@ * @see \MongoDB\Collection::createIndexes() * @see https://mongodb.com/docs/manual/reference/command/createIndexes/ */ -final class CreateIndexes implements Executable +final class CreateIndexes { private const WIRE_VERSION_FOR_COMMIT_QUORUM = 9; @@ -116,7 +116,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @return string[] The names of the created indexes * @throws UnsupportedException if write concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/CreateSearchIndexes.php b/src/Operation/CreateSearchIndexes.php index b96ca0f41..d21ed9428 100644 --- a/src/Operation/CreateSearchIndexes.php +++ b/src/Operation/CreateSearchIndexes.php @@ -37,7 +37,7 @@ * @see \MongoDB\Collection::createSearchIndexes() * @see https://mongodb.com/docs/manual/reference/command/createSearchIndexes/ */ -final class CreateSearchIndexes implements Executable +final class CreateSearchIndexes { private array $indexes = []; @@ -68,7 +68,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @return string[] The names of the created indexes * @throws UnsupportedException if write concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/DatabaseCommand.php b/src/Operation/DatabaseCommand.php index 97cb7a500..567bbff9e 100644 --- a/src/Operation/DatabaseCommand.php +++ b/src/Operation/DatabaseCommand.php @@ -32,7 +32,7 @@ * * @see \MongoDB\Database::command() */ -final class DatabaseCommand implements Executable +final class DatabaseCommand { private Command $command; @@ -78,11 +78,6 @@ public function __construct(private string $databaseName, array|object $command, $this->command = $command instanceof Command ? $command : new Command($command); } - /** - * Execute the operation. - * - * @see Executable::execute() - */ public function execute(Server $server): CursorInterface { $cursor = $server->executeCommand($this->databaseName, $this->command, $this->createOptions()); diff --git a/src/Operation/Delete.php b/src/Operation/Delete.php index ae2a46306..7e264152f 100644 --- a/src/Operation/Delete.php +++ b/src/Operation/Delete.php @@ -42,7 +42,7 @@ * @internal * @see https://mongodb.com/docs/manual/reference/command/delete/ */ -final class Delete implements Executable, Explainable +final class Delete implements Explainable { private const WIRE_VERSION_FOR_HINT = 9; @@ -120,7 +120,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @throws UnsupportedException if hint or write concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/DeleteMany.php b/src/Operation/DeleteMany.php index 78090c464..5278ee08a 100644 --- a/src/Operation/DeleteMany.php +++ b/src/Operation/DeleteMany.php @@ -29,7 +29,7 @@ * @see \MongoDB\Collection::deleteOne() * @see https://mongodb.com/docs/manual/reference/command/delete/ */ -final class DeleteMany implements Executable, Explainable +final class DeleteMany implements Explainable { private Delete $delete; @@ -74,7 +74,6 @@ public function __construct(string $databaseName, string $collectionName, array| /** * Execute the operation. * - * @see Executable::execute() * @throws UnsupportedException if collation is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/DeleteOne.php b/src/Operation/DeleteOne.php index 157bb748a..44dd47ba5 100644 --- a/src/Operation/DeleteOne.php +++ b/src/Operation/DeleteOne.php @@ -29,7 +29,7 @@ * @see \MongoDB\Collection::deleteOne() * @see https://mongodb.com/docs/manual/reference/command/delete/ */ -final class DeleteOne implements Executable, Explainable +final class DeleteOne implements Explainable { private Delete $delete; @@ -74,7 +74,6 @@ public function __construct(string $databaseName, string $collectionName, array| /** * Execute the operation. * - * @see Executable::execute() * @throws UnsupportedException if collation is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/Distinct.php b/src/Operation/Distinct.php index 1f06c0ff2..09ae1f00d 100644 --- a/src/Operation/Distinct.php +++ b/src/Operation/Distinct.php @@ -40,7 +40,7 @@ * @see \MongoDB\Collection::distinct() * @see https://mongodb.com/docs/manual/reference/command/distinct/ */ -final class Distinct implements Executable, Explainable +final class Distinct implements Explainable { /** * Constructs a distinct command. @@ -109,7 +109,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @throws UnexpectedValueException if the command response was malformed * @throws UnsupportedException if read concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/DropCollection.php b/src/Operation/DropCollection.php index d1a0b65a8..c5878359e 100644 --- a/src/Operation/DropCollection.php +++ b/src/Operation/DropCollection.php @@ -36,7 +36,7 @@ * @see \MongoDB\Database::dropCollection() * @see https://mongodb.com/docs/manual/reference/command/drop/ */ -final class DropCollection implements Executable +final class DropCollection { private const ERROR_CODE_NAMESPACE_NOT_FOUND = 26; @@ -83,7 +83,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @return array|object Command result document * @throws UnsupportedException if write concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/DropDatabase.php b/src/Operation/DropDatabase.php index c60015e5c..3f9d7756f 100644 --- a/src/Operation/DropDatabase.php +++ b/src/Operation/DropDatabase.php @@ -34,7 +34,7 @@ * @see \MongoDB\Database::drop() * @see https://mongodb.com/docs/manual/reference/command/dropDatabase/ */ -final class DropDatabase implements Executable +final class DropDatabase { /** * Constructs a dropDatabase command. @@ -78,7 +78,6 @@ public function __construct(private string $databaseName, private array $options /** * Execute the operation. * - * @see Executable::execute() * @return array|object Command result document * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/DropEncryptedCollection.php b/src/Operation/DropEncryptedCollection.php index 32f143ee5..52fa1b8e3 100644 --- a/src/Operation/DropEncryptedCollection.php +++ b/src/Operation/DropEncryptedCollection.php @@ -37,7 +37,7 @@ * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.rst#drop-collection-helper * @see https://www.mongodb.com/docs/manual/core/queryable-encryption/fundamentals/manage-collections/ */ -final class DropEncryptedCollection implements Executable +final class DropEncryptedCollection { private DropCollection $dropCollection; @@ -85,7 +85,6 @@ public function __construct(string $databaseName, string $collectionName, array } /** - * @see Executable::execute() * @return array|object Command result document from dropping the encrypted collection * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/DropIndexes.php b/src/Operation/DropIndexes.php index d6b1beb59..152977445 100644 --- a/src/Operation/DropIndexes.php +++ b/src/Operation/DropIndexes.php @@ -35,7 +35,7 @@ * @see \MongoDB\Collection::dropIndexes() * @see https://mongodb.com/docs/manual/reference/command/dropIndexes/ */ -final class DropIndexes implements Executable +final class DropIndexes { /** * Constructs a dropIndexes command. @@ -92,7 +92,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @return array|object Command result document * @throws UnsupportedException if write concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/DropSearchIndex.php b/src/Operation/DropSearchIndex.php index 73b9c6e17..c79025fbb 100644 --- a/src/Operation/DropSearchIndex.php +++ b/src/Operation/DropSearchIndex.php @@ -30,7 +30,7 @@ * @see \MongoDB\Collection::dropSearchIndexes() * @see https://mongodb.com/docs/manual/reference/command/dropSearchIndexes/ */ -final class DropSearchIndex implements Executable +final class DropSearchIndex { private const ERROR_CODE_NAMESPACE_NOT_FOUND = 26; @@ -53,7 +53,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @throws UnsupportedException if write concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/EstimatedDocumentCount.php b/src/Operation/EstimatedDocumentCount.php index 2a5aada61..716996541 100644 --- a/src/Operation/EstimatedDocumentCount.php +++ b/src/Operation/EstimatedDocumentCount.php @@ -35,7 +35,7 @@ * @see \MongoDB\Collection::estimatedDocumentCount() * @see https://mongodb.com/docs/manual/reference/command/count/ */ -final class EstimatedDocumentCount implements Executable, Explainable +final class EstimatedDocumentCount implements Explainable { private array $options; @@ -87,7 +87,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @throws UnexpectedValueException if the command response was malformed * @throws UnsupportedException if collation or read concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/Executable.php b/src/Operation/Executable.php deleted file mode 100644 index 2c8dbc9f2..000000000 --- a/src/Operation/Executable.php +++ /dev/null @@ -1,39 +0,0 @@ - */ private array $documents; @@ -114,7 +114,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @throws UnsupportedException if write concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/InsertOne.php b/src/Operation/InsertOne.php index 2c08d8db2..dff9f79f6 100644 --- a/src/Operation/InsertOne.php +++ b/src/Operation/InsertOne.php @@ -36,7 +36,7 @@ * @see \MongoDB\Collection::insertOne() * @see https://mongodb.com/docs/manual/reference/command/insert/ */ -final class InsertOne implements Executable +final class InsertOne { private array|object $document; @@ -97,7 +97,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @throws UnsupportedException if write concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/ListCollectionNames.php b/src/Operation/ListCollectionNames.php index fefa464af..52076d19b 100644 --- a/src/Operation/ListCollectionNames.php +++ b/src/Operation/ListCollectionNames.php @@ -30,7 +30,7 @@ * @see \MongoDB\Database::listCollectionNames() * @see https://mongodb.com/docs/manual/reference/command/listCollections/ */ -final class ListCollectionNames implements Executable +final class ListCollectionNames { private ListCollectionsCommand $listCollections; @@ -67,7 +67,6 @@ public function __construct(string $databaseName, array $options = []) /** * Execute the operation. * - * @see Executable::execute() * @return Iterator * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/ListCollections.php b/src/Operation/ListCollections.php index efce4da48..56bc60d48 100644 --- a/src/Operation/ListCollections.php +++ b/src/Operation/ListCollections.php @@ -32,7 +32,7 @@ * @see \MongoDB\Database::listCollections() * @see https://mongodb.com/docs/manual/reference/command/listCollections/ */ -final class ListCollections implements Executable +final class ListCollections { private ListCollectionsCommand $listCollections; @@ -69,7 +69,6 @@ public function __construct(private string $databaseName, array $options = []) /** * Execute the operation. * - * @see Executable::execute() * @return Iterator * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/ListDatabaseNames.php b/src/Operation/ListDatabaseNames.php index 0c6ee5437..f39223f9f 100644 --- a/src/Operation/ListDatabaseNames.php +++ b/src/Operation/ListDatabaseNames.php @@ -33,7 +33,7 @@ * @see \MongoDB\Client::listDatabaseNames() * @see https://mongodb.com/docs/manual/reference/command/listDatabases/#mongodb-dbcommand-dbcmd.listDatabases */ -final class ListDatabaseNames implements Executable +final class ListDatabaseNames { private ListDatabasesCommand $listDatabases; @@ -69,7 +69,6 @@ public function __construct(array $options = []) /** * Execute the operation. * - * @see Executable::execute() * @throws UnexpectedValueException if the command response was malformed * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/ListDatabases.php b/src/Operation/ListDatabases.php index 1e67daafd..75c7586df 100644 --- a/src/Operation/ListDatabases.php +++ b/src/Operation/ListDatabases.php @@ -33,7 +33,7 @@ * @see \MongoDB\Client::listDatabases() * @see https://mongodb.com/docs/manual/reference/command/listDatabases/#mongodb-dbcommand-dbcmd.listDatabases` */ -final class ListDatabases implements Executable +final class ListDatabases { private ListDatabasesCommand $listDatabases; @@ -69,7 +69,6 @@ public function __construct(array $options = []) /** * Execute the operation. * - * @see Executable::execute() * @return Iterator * @throws UnexpectedValueException if the command response was malformed * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/ListIndexes.php b/src/Operation/ListIndexes.php index a32b96b97..5417d8c66 100644 --- a/src/Operation/ListIndexes.php +++ b/src/Operation/ListIndexes.php @@ -38,7 +38,7 @@ * @see \MongoDB\Collection::listIndexes() * @see https://mongodb.com/docs/manual/reference/command/listIndexes/ */ -final class ListIndexes implements Executable +final class ListIndexes { private const ERROR_CODE_DATABASE_NOT_FOUND = 60; private const ERROR_CODE_NAMESPACE_NOT_FOUND = 26; @@ -76,7 +76,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @return Iterator * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/ListSearchIndexes.php b/src/Operation/ListSearchIndexes.php index 8a3850968..bd6810e98 100644 --- a/src/Operation/ListSearchIndexes.php +++ b/src/Operation/ListSearchIndexes.php @@ -35,7 +35,7 @@ * @see \MongoDB\Collection::listSearchIndexes() * @see https://mongodb.com/docs/manual/reference/command/listSearchIndexes/ */ -final class ListSearchIndexes implements Executable +final class ListSearchIndexes { private array $listSearchIndexesOptions; private array $aggregateOptions; @@ -68,7 +68,6 @@ public function __construct(private string $databaseName, private string $collec * Execute the operation. * * @return Iterator&Countable - * @see Executable::execute() * @throws UnexpectedValueException if the command response was malformed * @throws UnsupportedException if collation or read concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/MapReduce.php b/src/Operation/MapReduce.php index 197f340fa..f0ddca872 100644 --- a/src/Operation/MapReduce.php +++ b/src/Operation/MapReduce.php @@ -54,7 +54,7 @@ * @see https://mongodb.com/docs/manual/reference/command/mapReduce/ * @psalm-import-type MapReduceCallable from MapReduceResult */ -final class MapReduce implements Executable +final class MapReduce { private array|object|string $out; @@ -240,7 +240,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @throws UnexpectedValueException if the command response was malformed * @throws UnsupportedException if read concern or write concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/ModifyCollection.php b/src/Operation/ModifyCollection.php index 45a5f1c4b..7b40f2f8c 100644 --- a/src/Operation/ModifyCollection.php +++ b/src/Operation/ModifyCollection.php @@ -33,7 +33,7 @@ * @see \MongoDB\Database::modifyCollection() * @see https://mongodb.com/docs/manual/reference/command/collMod/ */ -final class ModifyCollection implements Executable +final class ModifyCollection { /** * Constructs a collMod command. @@ -83,7 +83,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @return array|object Command result document * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/RenameCollection.php b/src/Operation/RenameCollection.php index 078bf487f..5804bb474 100644 --- a/src/Operation/RenameCollection.php +++ b/src/Operation/RenameCollection.php @@ -36,7 +36,7 @@ * @see \MongoDB\Database::renameCollection() * @see https://mongodb.com/docs/manual/reference/command/renameCollection/ */ -final class RenameCollection implements Executable +final class RenameCollection { private string $fromNamespace; @@ -97,7 +97,6 @@ public function __construct(string $fromDatabaseName, string $fromCollectionName /** * Execute the operation. * - * @see Executable::execute() * @return array|object Command result document * @throws UnsupportedException if write concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/ReplaceOne.php b/src/Operation/ReplaceOne.php index ab4944b27..3133ea034 100644 --- a/src/Operation/ReplaceOne.php +++ b/src/Operation/ReplaceOne.php @@ -34,7 +34,7 @@ * @see \MongoDB\Collection::replaceOne() * @see https://mongodb.com/docs/manual/reference/command/update/ */ -final class ReplaceOne implements Executable +final class ReplaceOne { private Update $update; @@ -103,7 +103,6 @@ public function __construct(string $databaseName, string $collectionName, array| /** * Execute the operation. * - * @see Executable::execute() * @throws UnsupportedException if collation is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/Update.php b/src/Operation/Update.php index 79f64fecb..3e2da46af 100644 --- a/src/Operation/Update.php +++ b/src/Operation/Update.php @@ -45,7 +45,7 @@ * @internal * @see https://mongodb.com/docs/manual/reference/command/update/ */ -final class Update implements Executable, Explainable +final class Update implements Explainable { private const WIRE_VERSION_FOR_HINT = 8; @@ -164,7 +164,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @throws UnsupportedException if hint or write concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/UpdateMany.php b/src/Operation/UpdateMany.php index ac1f932a7..97865288c 100644 --- a/src/Operation/UpdateMany.php +++ b/src/Operation/UpdateMany.php @@ -32,7 +32,7 @@ * @see \MongoDB\Collection::updateMany() * @see https://mongodb.com/docs/manual/reference/command/update/ */ -final class UpdateMany implements Executable, Explainable +final class UpdateMany implements Explainable { private Update $update; @@ -97,7 +97,6 @@ public function __construct(string $databaseName, string $collectionName, array| /** * Execute the operation. * - * @see Executable::execute() * @throws UnsupportedException if collation is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/UpdateOne.php b/src/Operation/UpdateOne.php index d1026e65f..794d80058 100644 --- a/src/Operation/UpdateOne.php +++ b/src/Operation/UpdateOne.php @@ -32,7 +32,7 @@ * @see \MongoDB\Collection::updateOne() * @see https://mongodb.com/docs/manual/reference/command/update/ */ -final class UpdateOne implements Executable, Explainable +final class UpdateOne implements Explainable { private Update $update; @@ -97,7 +97,6 @@ public function __construct(string $databaseName, string $collectionName, array| /** * Execute the operation. * - * @see Executable::execute() * @throws UnsupportedException if collation is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/UpdateSearchIndex.php b/src/Operation/UpdateSearchIndex.php index 9aff80662..4543914bb 100644 --- a/src/Operation/UpdateSearchIndex.php +++ b/src/Operation/UpdateSearchIndex.php @@ -31,7 +31,7 @@ * @see \MongoDB\Collection::updateSearchIndexes() * @see https://mongodb.com/docs/manual/reference/command/updateSearchIndexes/ */ -final class UpdateSearchIndex implements Executable +final class UpdateSearchIndex { private object $definition; @@ -61,7 +61,6 @@ public function __construct(private string $databaseName, private string $collec /** * Execute the operation. * - * @see Executable::execute() * @throws UnsupportedException if write concern is used and unsupported * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ diff --git a/src/Operation/Watch.php b/src/Operation/Watch.php index dd82731b3..3a09fd0a1 100644 --- a/src/Operation/Watch.php +++ b/src/Operation/Watch.php @@ -56,7 +56,7 @@ * @see \MongoDB\Collection::watch() * @see https://mongodb.com/docs/manual/changeStreams/ */ -final class Watch implements Executable, /* @internal */ CommandSubscriber +final class Watch implements /* @internal */ CommandSubscriber { public const FULL_DOCUMENT_UPDATE_LOOKUP = 'updateLookup'; public const FULL_DOCUMENT_WHEN_AVAILABLE = 'whenAvailable'; @@ -263,7 +263,6 @@ public function __construct(private Manager $manager, ?string $databaseName, pri /** * Execute the operation. * - * @see Executable::execute() * @throws UnsupportedException if collation or read concern is used and unsupported * @throws RuntimeException for other driver errors (e.g. connection errors) */