Skip to content

Commit 9bd1347

Browse files
committed
PHPLIB-1517: Remove Executable interface
1 parent c7728da commit 9bd1347

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+47
-136
lines changed

UPGRADE-2.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ UPGRADE FROM 1.x to 2.0
99
* The `MongoDB\Model\IndexInfo::isGeoHaystack` method has been removed.
1010
* The `maxScan`, `modifiers`, `oplogReplay`, and `snapshot` options for `find`
1111
and `findOne` operations have been removed.
12+
* The `MongoDB\Operation\Executable` interface has been removed.
1213

1314
GridFS
1415
------

src/Command/ListCollections.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
use MongoDB\Driver\Session;
2525
use MongoDB\Exception\InvalidArgumentException;
2626
use MongoDB\Model\CachingIterator;
27-
use MongoDB\Operation\Executable;
2827

2928
use function is_bool;
3029
use function is_integer;
@@ -36,7 +35,7 @@
3635
* @internal
3736
* @see https://mongodb.com/docs/manual/reference/command/listCollections/
3837
*/
39-
final class ListCollections implements Executable
38+
final class ListCollections
4039
{
4140
/**
4241
* Constructs a listCollections command.
@@ -94,7 +93,6 @@ public function __construct(private string $databaseName, private array $options
9493
* Execute the operation.
9594
*
9695
* @return CachingIterator<int, array>
97-
* @see Executable::execute()
9896
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
9997
*/
10098
public function execute(Server $server): CachingIterator

src/Command/ListDatabases.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use MongoDB\Driver\Session;
2424
use MongoDB\Exception\InvalidArgumentException;
2525
use MongoDB\Exception\UnexpectedValueException;
26-
use MongoDB\Operation\Executable;
2726

2827
use function current;
2928
use function is_array;
@@ -37,7 +36,7 @@
3736
* @internal
3837
* @see https://mongodb.com/docs/manual/reference/command/listDatabases/
3938
*/
40-
final class ListDatabases implements Executable
39+
final class ListDatabases
4140
{
4241
/**
4342
* Constructs a listDatabases command.
@@ -93,7 +92,6 @@ public function __construct(private array $options = [])
9392
/**
9493
* Execute the operation.
9594
*
96-
* @see Executable::execute()
9795
* @return array An array of database info structures
9896
* @throws UnexpectedValueException if the command response was malformed
9997
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)

src/Operation/Aggregate.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
* @see \MongoDB\Collection::aggregate()
4848
* @see https://mongodb.com/docs/manual/reference/command/aggregate/
4949
*/
50-
final class Aggregate implements Executable, Explainable
50+
final class Aggregate implements Explainable
5151
{
5252
private bool $isWrite;
5353

@@ -212,7 +212,6 @@ public function __construct(private string $databaseName, private ?string $colle
212212
/**
213213
* Execute the operation.
214214
*
215-
* @see Executable::execute()
216215
* @throws UnexpectedValueException if the command response was malformed
217216
* @throws UnsupportedException if read concern or write concern is used and unsupported
218217
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)

src/Operation/BulkWrite.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
*
4747
* @see \MongoDB\Collection::bulkWrite()
4848
*/
49-
final class BulkWrite implements Executable
49+
final class BulkWrite
5050
{
5151
public const DELETE_MANY = 'deleteMany';
5252
public const DELETE_ONE = 'deleteOne';
@@ -185,7 +185,6 @@ public function __construct(private string $databaseName, private string $collec
185185
/**
186186
* Execute the operation.
187187
*
188-
* @see Executable::execute()
189188
* @throws UnsupportedException if write concern is used and unsupported
190189
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
191190
*/

src/Operation/Count.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* @see \MongoDB\Collection::count()
4242
* @see https://mongodb.com/docs/manual/reference/command/count/
4343
*/
44-
final class Count implements Executable, Explainable
44+
final class Count implements Explainable
4545
{
4646
/**
4747
* Constructs a count command.
@@ -124,7 +124,6 @@ public function __construct(private string $databaseName, private string $collec
124124
/**
125125
* Execute the operation.
126126
*
127-
* @see Executable::execute()
128127
* @throws UnexpectedValueException if the command response was malformed
129128
* @throws UnsupportedException if read concern is used and unsupported
130129
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)

src/Operation/CountDocuments.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* @see \MongoDB\Collection::countDocuments()
3838
* @see https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#countdocuments
3939
*/
40-
final class CountDocuments implements Executable
40+
final class CountDocuments
4141
{
4242
private array $aggregateOptions;
4343

@@ -103,7 +103,6 @@ public function __construct(private string $databaseName, private string $collec
103103
/**
104104
* Execute the operation.
105105
*
106-
* @see Executable::execute()
107106
* @throws UnexpectedValueException if the command response was malformed
108107
* @throws UnsupportedException if collation or read concern is used and unsupported
109108
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)

src/Operation/CreateCollection.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* @see \MongoDB\Database::createCollection()
4242
* @see https://mongodb.com/docs/manual/reference/command/create/
4343
*/
44-
final class CreateCollection implements Executable
44+
final class CreateCollection
4545
{
4646
public const USE_POWER_OF_2_SIZES = 1;
4747
public const NO_PADDING = 2;
@@ -239,7 +239,6 @@ public function __construct(private string $databaseName, private string $collec
239239
/**
240240
* Execute the operation.
241241
*
242-
* @see Executable::execute()
243242
* @return array|object Command result document
244243
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
245244
*/

src/Operation/CreateEncryptedCollection.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
* @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.rst#create-encrypted-collection-helper
4949
* @see https://www.mongodb.com/docs/manual/core/queryable-encryption/fundamentals/manage-collections/
5050
*/
51-
final class CreateEncryptedCollection implements Executable
51+
final class CreateEncryptedCollection
5252
{
5353
private const WIRE_VERSION_FOR_QUERYABLE_ENCRYPTION_V2 = 21;
5454

@@ -155,7 +155,6 @@ public function createDataKeys(ClientEncryption $clientEncryption, string $kmsPr
155155
}
156156

157157
/**
158-
* @see Executable::execute()
159158
* @return array|object Command result document from creating the encrypted collection
160159
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
161160
* @throws UnsupportedException if the server does not support Queryable Encryption

src/Operation/CreateIndexes.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* @see \MongoDB\Collection::createIndexes()
4242
* @see https://mongodb.com/docs/manual/reference/command/createIndexes/
4343
*/
44-
final class CreateIndexes implements Executable
44+
final class CreateIndexes
4545
{
4646
private const WIRE_VERSION_FOR_COMMIT_QUORUM = 9;
4747

@@ -116,7 +116,6 @@ public function __construct(private string $databaseName, private string $collec
116116
/**
117117
* Execute the operation.
118118
*
119-
* @see Executable::execute()
120119
* @return string[] The names of the created indexes
121120
* @throws UnsupportedException if write concern is used and unsupported
122121
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)

0 commit comments

Comments
 (0)