Skip to content

Commit 89fb97a

Browse files
authored
Add final annotations to non-internal Operation classes (#1410)
1 parent f2842bc commit 89fb97a

38 files changed

+77
-1
lines changed

src/Operation/Aggregate.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
*
4949
* @see \MongoDB\Collection::aggregate()
5050
* @see https://mongodb.com/docs/manual/reference/command/aggregate/
51+
*
52+
* @final extending this class will not be supported in v2.0.0
5153
*/
5254
class Aggregate implements Executable, Explainable
5355
{

src/Operation/BulkWrite.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
* Operation for executing multiple write operations.
4646
*
4747
* @see \MongoDB\Collection::bulkWrite()
48+
*
49+
* @final extending this class will not be supported in v2.0.0
4850
*/
4951
class BulkWrite implements Executable
5052
{

src/Operation/Count.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
*
4141
* @see \MongoDB\Collection::count()
4242
* @see https://mongodb.com/docs/manual/reference/command/count/
43+
*
44+
* @final extending this class will not be supported in v2.0.0
4345
*/
4446
class Count implements Executable, Explainable
4547
{

src/Operation/CountDocuments.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
*
3737
* @see \MongoDB\Collection::countDocuments()
3838
* @see https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#countdocuments
39+
*
40+
* @final extending this class will not be supported in v2.0.0
3941
*/
4042
class CountDocuments implements Executable
4143
{

src/Operation/CreateCollection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
*
4141
* @see \MongoDB\Database::createCollection()
4242
* @see https://mongodb.com/docs/manual/reference/command/create/
43+
*
44+
* @final extending this class will not be supported in v2.0.0
4345
*/
4446
class CreateCollection implements Executable
4547
{

src/Operation/CreateIndexes.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
* @see \MongoDB\Collection::createIndex()
4141
* @see \MongoDB\Collection::createIndexes()
4242
* @see https://mongodb.com/docs/manual/reference/command/createIndexes/
43+
*
44+
* @final extending this class will not be supported in v2.0.0
4345
*/
4446
class CreateIndexes implements Executable
4547
{

src/Operation/CreateSearchIndexes.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
* @see \MongoDB\Collection::createSearchIndex()
3737
* @see \MongoDB\Collection::createSearchIndexes()
3838
* @see https://mongodb.com/docs/manual/reference/command/createSearchIndexes/
39+
*
40+
* @final extending this class will not be supported in v2.0.0
3941
*/
4042
class CreateSearchIndexes implements Executable
4143
{

src/Operation/DatabaseCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
* Operation for executing a database command.
3232
*
3333
* @see \MongoDB\Database::command()
34+
*
35+
* @final extending this class will not be supported in v2.0.0
3436
*/
3537
class DatabaseCommand implements Executable
3638
{

src/Operation/DeleteMany.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
*
2929
* @see \MongoDB\Collection::deleteOne()
3030
* @see https://mongodb.com/docs/manual/reference/command/delete/
31+
*
32+
* @final extending this class will not be supported in v2.0.0
3133
*/
3234
class DeleteMany implements Executable, Explainable
3335
{

src/Operation/DeleteOne.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
*
2929
* @see \MongoDB\Collection::deleteOne()
3030
* @see https://mongodb.com/docs/manual/reference/command/delete/
31+
*
32+
* @final extending this class will not be supported in v2.0.0
3133
*/
3234
class DeleteOne implements Executable, Explainable
3335
{

src/Operation/Distinct.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
*
4040
* @see \MongoDB\Collection::distinct()
4141
* @see https://mongodb.com/docs/manual/reference/command/distinct/
42+
*
43+
* @final extending this class will not be supported in v2.0.0
4244
*/
4345
class Distinct implements Executable, Explainable
4446
{

src/Operation/DropCollection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
* @see \MongoDB\Collection::drop()
3636
* @see \MongoDB\Database::dropCollection()
3737
* @see https://mongodb.com/docs/manual/reference/command/drop/
38+
*
39+
* @final extending this class will not be supported in v2.0.0
3840
*/
3941
class DropCollection implements Executable
4042
{

src/Operation/DropDatabase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
* @see \MongoDB\Client::dropDatabase()
3434
* @see \MongoDB\Database::drop()
3535
* @see https://mongodb.com/docs/manual/reference/command/dropDatabase/
36+
*
37+
* @final extending this class will not be supported in v2.0.0
3638
*/
3739
class DropDatabase implements Executable
3840
{

src/Operation/DropIndexes.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
*
3535
* @see \MongoDB\Collection::dropIndexes()
3636
* @see https://mongodb.com/docs/manual/reference/command/dropIndexes/
37+
*
38+
* @final extending this class will not be supported in v2.0.0
3739
*/
3840
class DropIndexes implements Executable
3941
{

src/Operation/DropSearchIndex.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
*
3030
* @see \MongoDB\Collection::dropSearchIndexes()
3131
* @see https://mongodb.com/docs/manual/reference/command/dropSearchIndexes/
32+
*
33+
* @final extending this class will not be supported in v2.0.0
3234
*/
3335
class DropSearchIndex implements Executable
3436
{

src/Operation/EstimatedDocumentCount.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
*
3535
* @see \MongoDB\Collection::estimatedDocumentCount()
3636
* @see https://mongodb.com/docs/manual/reference/command/count/
37+
*
38+
* @final extending this class will not be supported in v2.0.0
3739
*/
3840
class EstimatedDocumentCount implements Executable, Explainable
3941
{

src/Operation/Explain.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
*
3535
* @see \MongoDB\Collection::explain()
3636
* @see https://mongodb.com/docs/manual/reference/command/explain/
37+
*
38+
* @final extending this class will not be supported in v2.0.0
3739
*/
3840
class Explain implements Executable
3941
{

src/Operation/Find.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
* @see \MongoDB\Collection::find()
4848
* @see https://mongodb.com/docs/manual/tutorial/query-documents/
4949
* @see https://mongodb.com/docs/manual/reference/operator/query-modifier/
50+
*
51+
* @final extending this class will not be supported in v2.0.0
5052
*/
5153
class Find implements Executable, Explainable
5254
{

src/Operation/FindOne.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
* @see \MongoDB\Collection::findOne()
3131
* @see https://mongodb.com/docs/manual/tutorial/query-documents/
3232
* @see https://mongodb.com/docs/manual/reference/operator/query-modifier/
33+
*
34+
* @final extending this class will not be supported in v2.0.0
3335
*/
3436
class FindOne implements Executable, Explainable
3537
{

src/Operation/FindOneAndDelete.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
*
3030
* @see \MongoDB\Collection::findOneAndDelete()
3131
* @see https://mongodb.com/docs/manual/reference/command/findAndModify/
32+
*
33+
* @final extending this class will not be supported in v2.0.0
3234
*/
3335
class FindOneAndDelete implements Executable, Explainable
3436
{

src/Operation/FindOneAndReplace.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
*
3535
* @see \MongoDB\Collection::findOneAndReplace()
3636
* @see https://mongodb.com/docs/manual/reference/command/findAndModify/
37+
*
38+
* @final extending this class will not be supported in v2.0.0
3739
*/
3840
class FindOneAndReplace implements Executable, Explainable
3941
{

src/Operation/FindOneAndUpdate.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
*
3434
* @see \MongoDB\Collection::findOneAndUpdate()
3535
* @see https://mongodb.com/docs/manual/reference/command/findAndModify/
36+
*
37+
* @final extending this class will not be supported in v2.0.0
3638
*/
3739
class FindOneAndUpdate implements Executable, Explainable
3840
{

src/Operation/InsertMany.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
*
3838
* @see \MongoDB\Collection::insertMany()
3939
* @see https://mongodb.com/docs/manual/reference/command/insert/
40+
*
41+
* @final extending this class will not be supported in v2.0.0
4042
*/
4143
class InsertMany implements Executable
4244
{

src/Operation/InsertOne.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
*
3636
* @see \MongoDB\Collection::insertOne()
3737
* @see https://mongodb.com/docs/manual/reference/command/insert/
38+
*
39+
* @final extending this class will not be supported in v2.0.0
3840
*/
3941
class InsertOne implements Executable
4042
{

src/Operation/ListCollectionNames.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
*
3030
* @see \MongoDB\Database::listCollectionNames()
3131
* @see https://mongodb.com/docs/manual/reference/command/listCollections/
32+
*
33+
* @final extending this class will not be supported in v2.0.0
3234
*/
3335
class ListCollectionNames implements Executable
3436
{

src/Operation/ListCollections.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
*
3030
* @see \MongoDB\Database::listCollections()
3131
* @see https://mongodb.com/docs/manual/reference/command/listCollections/
32+
*
33+
* @final extending this class will not be supported in v2.0.0
3234
*/
3335
class ListCollections implements Executable
3436
{

src/Operation/ListDatabaseNames.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
*
3333
* @see \MongoDB\Client::listDatabaseNames()
3434
* @see https://mongodb.com/docs/manual/reference/command/listDatabases/#mongodb-dbcommand-dbcmd.listDatabases
35+
*
36+
* @final extending this class will not be supported in v2.0.0
3537
*/
3638
class ListDatabaseNames implements Executable
3739
{

src/Operation/ListDatabases.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
* Operation for the ListDatabases command.
3030
*
3131
* @see \MongoDB\Client::listDatabases()
32-
* @see https://mongodb.com/docs/manual/reference/command/listDatabases/#mongodb-dbcommand-dbcmd.listDatabases`
32+
* @see https://mongodb.com/docs/manual/reference/command/listDatabases/#mongodb-dbcommand-dbcmd.listDatabases
33+
*
34+
* @final extending this class will not be supported in v2.0.0
3335
*/
3436
class ListDatabases implements Executable
3537
{

src/Operation/ListIndexes.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
*
3636
* @see \MongoDB\Collection::listIndexes()
3737
* @see https://mongodb.com/docs/manual/reference/command/listIndexes/
38+
*
39+
* @final extending this class will not be supported in v2.0.0
3840
*/
3941
class ListIndexes implements Executable
4042
{

src/Operation/ListSearchIndexes.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
*
3535
* @see \MongoDB\Collection::listSearchIndexes()
3636
* @see https://mongodb.com/docs/manual/reference/command/listSearchIndexes/
37+
*
38+
* @final extending this class will not be supported in v2.0.0
3739
*/
3840
class ListSearchIndexes implements Executable
3941
{

src/Operation/MapReduce.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
* @see \MongoDB\Collection::mapReduce()
5454
* @see https://mongodb.com/docs/manual/reference/command/mapReduce/
5555
* @psalm-import-type MapReduceCallable from MapReduceResult
56+
*
57+
* @final extending this class will not be supported in v2.0.0
5658
*/
5759
class MapReduce implements Executable
5860
{

src/Operation/ModifyCollection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
*
3333
* @see \MongoDB\Database::modifyCollection()
3434
* @see https://mongodb.com/docs/manual/reference/command/collMod/
35+
*
36+
* @final extending this class will not be supported in v2.0.0
3537
*/
3638
class ModifyCollection implements Executable
3739
{

src/Operation/RenameCollection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
* @see \MongoDB\Collection::rename()
3636
* @see \MongoDB\Database::renameCollection()
3737
* @see https://mongodb.com/docs/manual/reference/command/renameCollection/
38+
*
39+
* @final extending this class will not be supported in v2.0.0
3840
*/
3941
class RenameCollection implements Executable
4042
{

src/Operation/ReplaceOne.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
*
3434
* @see \MongoDB\Collection::replaceOne()
3535
* @see https://mongodb.com/docs/manual/reference/command/update/
36+
*
37+
* @final extending this class will not be supported in v2.0.0
3638
*/
3739
class ReplaceOne implements Executable
3840
{

src/Operation/UpdateMany.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
*
3232
* @see \MongoDB\Collection::updateMany()
3333
* @see https://mongodb.com/docs/manual/reference/command/update/
34+
*
35+
* @final extending this class will not be supported in v2.0.0
3436
*/
3537
class UpdateMany implements Executable, Explainable
3638
{

src/Operation/UpdateOne.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
*
3232
* @see \MongoDB\Collection::updateOne()
3333
* @see https://mongodb.com/docs/manual/reference/command/update/
34+
*
35+
* @final extending this class will not be supported in v2.0.0
3436
*/
3537
class UpdateOne implements Executable, Explainable
3638
{

src/Operation/UpdateSearchIndex.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
*
3131
* @see \MongoDB\Collection::updateSearchIndexes()
3232
* @see https://mongodb.com/docs/manual/reference/command/updateSearchIndexes/
33+
*
34+
* @final extending this class will not be supported in v2.0.0
3335
*/
3436
class UpdateSearchIndex implements Executable
3537
{

src/Operation/Watch.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
*
5757
* @see \MongoDB\Collection::watch()
5858
* @see https://mongodb.com/docs/manual/changeStreams/
59+
*
60+
* @final extending this class will not be supported in v2.0.0
5961
*/
6062
class Watch implements Executable, /* @internal */ CommandSubscriber
6163
{

0 commit comments

Comments
 (0)