Skip to content

PHPLIB-1521 Add final annotations to non-internal Operation classes #1410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Operation/Aggregate.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
*
* @see \MongoDB\Collection::aggregate()
* @see https://mongodb.com/docs/manual/reference/command/aggregate/
*
* @final extending this class will not be supported in v2.0.0
*/
class Aggregate implements Executable, Explainable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/BulkWrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
* Operation for executing multiple write operations.
*
* @see \MongoDB\Collection::bulkWrite()
*
* @final extending this class will not be supported in v2.0.0
*/
class BulkWrite implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/Count.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
*
* @see \MongoDB\Collection::count()
* @see https://mongodb.com/docs/manual/reference/command/count/
*
* @final extending this class will not be supported in v2.0.0
*/
class Count implements Executable, Explainable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/CountDocuments.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
*
* @see \MongoDB\Collection::countDocuments()
* @see https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#countdocuments
*
* @final extending this class will not be supported in v2.0.0
*/
class CountDocuments implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/CreateCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
*
* @see \MongoDB\Database::createCollection()
* @see https://mongodb.com/docs/manual/reference/command/create/
*
* @final extending this class will not be supported in v2.0.0
*/
class CreateCollection implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/CreateIndexes.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
* @see \MongoDB\Collection::createIndex()
* @see \MongoDB\Collection::createIndexes()
* @see https://mongodb.com/docs/manual/reference/command/createIndexes/
*
* @final extending this class will not be supported in v2.0.0
*/
class CreateIndexes implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/CreateSearchIndexes.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
* @see \MongoDB\Collection::createSearchIndex()
* @see \MongoDB\Collection::createSearchIndexes()
* @see https://mongodb.com/docs/manual/reference/command/createSearchIndexes/
*
* @final extending this class will not be supported in v2.0.0
*/
class CreateSearchIndexes implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/DatabaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
* Operation for executing a database command.
*
* @see \MongoDB\Database::command()
*
* @final extending this class will not be supported in v2.0.0
*/
class DatabaseCommand implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/DeleteMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
*
* @see \MongoDB\Collection::deleteOne()
* @see https://mongodb.com/docs/manual/reference/command/delete/
*
* @final extending this class will not be supported in v2.0.0
*/
class DeleteMany implements Executable, Explainable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/DeleteOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
*
* @see \MongoDB\Collection::deleteOne()
* @see https://mongodb.com/docs/manual/reference/command/delete/
*
* @final extending this class will not be supported in v2.0.0
*/
class DeleteOne implements Executable, Explainable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/Distinct.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
*
* @see \MongoDB\Collection::distinct()
* @see https://mongodb.com/docs/manual/reference/command/distinct/
*
* @final extending this class will not be supported in v2.0.0
*/
class Distinct implements Executable, Explainable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/DropCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
* @see \MongoDB\Collection::drop()
* @see \MongoDB\Database::dropCollection()
* @see https://mongodb.com/docs/manual/reference/command/drop/
*
* @final extending this class will not be supported in v2.0.0
*/
class DropCollection implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/DropDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
* @see \MongoDB\Client::dropDatabase()
* @see \MongoDB\Database::drop()
* @see https://mongodb.com/docs/manual/reference/command/dropDatabase/
*
* @final extending this class will not be supported in v2.0.0
*/
class DropDatabase implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/DropIndexes.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
*
* @see \MongoDB\Collection::dropIndexes()
* @see https://mongodb.com/docs/manual/reference/command/dropIndexes/
*
* @final extending this class will not be supported in v2.0.0
*/
class DropIndexes implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/DropSearchIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
*
* @see \MongoDB\Collection::dropSearchIndexes()
* @see https://mongodb.com/docs/manual/reference/command/dropSearchIndexes/
*
* @final extending this class will not be supported in v2.0.0
*/
class DropSearchIndex implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/EstimatedDocumentCount.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
*
* @see \MongoDB\Collection::estimatedDocumentCount()
* @see https://mongodb.com/docs/manual/reference/command/count/
*
* @final extending this class will not be supported in v2.0.0
*/
class EstimatedDocumentCount implements Executable, Explainable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/Explain.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
*
* @see \MongoDB\Collection::explain()
* @see https://mongodb.com/docs/manual/reference/command/explain/
*
* @final extending this class will not be supported in v2.0.0
*/
class Explain implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/Find.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
* @see \MongoDB\Collection::find()
* @see https://mongodb.com/docs/manual/tutorial/query-documents/
* @see https://mongodb.com/docs/manual/reference/operator/query-modifier/
*
* @final extending this class will not be supported in v2.0.0
*/
class Find implements Executable, Explainable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/FindOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
* @see \MongoDB\Collection::findOne()
* @see https://mongodb.com/docs/manual/tutorial/query-documents/
* @see https://mongodb.com/docs/manual/reference/operator/query-modifier/
*
* @final extending this class will not be supported in v2.0.0
*/
class FindOne implements Executable, Explainable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/FindOneAndDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
*
* @see \MongoDB\Collection::findOneAndDelete()
* @see https://mongodb.com/docs/manual/reference/command/findAndModify/
*
* @final extending this class will not be supported in v2.0.0
*/
class FindOneAndDelete implements Executable, Explainable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/FindOneAndReplace.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
*
* @see \MongoDB\Collection::findOneAndReplace()
* @see https://mongodb.com/docs/manual/reference/command/findAndModify/
*
* @final extending this class will not be supported in v2.0.0
*/
class FindOneAndReplace implements Executable, Explainable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/FindOneAndUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
*
* @see \MongoDB\Collection::findOneAndUpdate()
* @see https://mongodb.com/docs/manual/reference/command/findAndModify/
*
* @final extending this class will not be supported in v2.0.0
*/
class FindOneAndUpdate implements Executable, Explainable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/InsertMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
*
* @see \MongoDB\Collection::insertMany()
* @see https://mongodb.com/docs/manual/reference/command/insert/
*
* @final extending this class will not be supported in v2.0.0
*/
class InsertMany implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/InsertOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
*
* @see \MongoDB\Collection::insertOne()
* @see https://mongodb.com/docs/manual/reference/command/insert/
*
* @final extending this class will not be supported in v2.0.0
*/
class InsertOne implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/ListCollectionNames.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
*
* @see \MongoDB\Database::listCollectionNames()
* @see https://mongodb.com/docs/manual/reference/command/listCollections/
*
* @final extending this class will not be supported in v2.0.0
*/
class ListCollectionNames implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/ListCollections.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
*
* @see \MongoDB\Database::listCollections()
* @see https://mongodb.com/docs/manual/reference/command/listCollections/
*
* @final extending this class will not be supported in v2.0.0
*/
class ListCollections implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/ListDatabaseNames.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
*
* @see \MongoDB\Client::listDatabaseNames()
* @see https://mongodb.com/docs/manual/reference/command/listDatabases/#mongodb-dbcommand-dbcmd.listDatabases
*
* @final extending this class will not be supported in v2.0.0
*/
class ListDatabaseNames implements Executable
{
Expand Down
4 changes: 3 additions & 1 deletion src/Operation/ListDatabases.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
* Operation for the ListDatabases command.
*
* @see \MongoDB\Client::listDatabases()
* @see https://mongodb.com/docs/manual/reference/command/listDatabases/#mongodb-dbcommand-dbcmd.listDatabases`
* @see https://mongodb.com/docs/manual/reference/command/listDatabases/#mongodb-dbcommand-dbcmd.listDatabases
*
* @final extending this class will not be supported in v2.0.0
*/
class ListDatabases implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/ListIndexes.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
*
* @see \MongoDB\Collection::listIndexes()
* @see https://mongodb.com/docs/manual/reference/command/listIndexes/
*
* @final extending this class will not be supported in v2.0.0
*/
class ListIndexes implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/ListSearchIndexes.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
*
* @see \MongoDB\Collection::listSearchIndexes()
* @see https://mongodb.com/docs/manual/reference/command/listSearchIndexes/
*
* @final extending this class will not be supported in v2.0.0
*/
class ListSearchIndexes implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/MapReduce.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
* @see \MongoDB\Collection::mapReduce()
* @see https://mongodb.com/docs/manual/reference/command/mapReduce/
* @psalm-import-type MapReduceCallable from MapReduceResult
*
* @final extending this class will not be supported in v2.0.0
*/
class MapReduce implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/ModifyCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
*
* @see \MongoDB\Database::modifyCollection()
* @see https://mongodb.com/docs/manual/reference/command/collMod/
*
* @final extending this class will not be supported in v2.0.0
*/
class ModifyCollection implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/RenameCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
* @see \MongoDB\Collection::rename()
* @see \MongoDB\Database::renameCollection()
* @see https://mongodb.com/docs/manual/reference/command/renameCollection/
*
* @final extending this class will not be supported in v2.0.0
*/
class RenameCollection implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/ReplaceOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
*
* @see \MongoDB\Collection::replaceOne()
* @see https://mongodb.com/docs/manual/reference/command/update/
*
* @final extending this class will not be supported in v2.0.0
*/
class ReplaceOne implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/UpdateMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
*
* @see \MongoDB\Collection::updateMany()
* @see https://mongodb.com/docs/manual/reference/command/update/
*
* @final extending this class will not be supported in v2.0.0
*/
class UpdateMany implements Executable, Explainable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/UpdateOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
*
* @see \MongoDB\Collection::updateOne()
* @see https://mongodb.com/docs/manual/reference/command/update/
*
* @final extending this class will not be supported in v2.0.0
*/
class UpdateOne implements Executable, Explainable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/UpdateSearchIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
*
* @see \MongoDB\Collection::updateSearchIndexes()
* @see https://mongodb.com/docs/manual/reference/command/updateSearchIndexes/
*
* @final extending this class will not be supported in v2.0.0
*/
class UpdateSearchIndex implements Executable
{
Expand Down
2 changes: 2 additions & 0 deletions src/Operation/Watch.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
*
* @see \MongoDB\Collection::watch()
* @see https://mongodb.com/docs/manual/changeStreams/
*
* @final extending this class will not be supported in v2.0.0
*/
class Watch implements Executable, /* @internal */ CommandSubscriber
{
Expand Down