PHPLIB is the only driver that have named the method MongoDB\Database::selectCollection($name)
- In mongosh and Java it is named db.getCollection(name)
- In python it's the same name in snake case: Database.get_collection().
Proposition:
- Add MongoDB\Database::getCollection($name) as alias for MongoDB\Database::selectCollection($name)
- Add MongoDB\Client::getDatabase($name) as alias for MongoDB\Client::selectDatabase($name)
Deprecation notices will be added later in PHPLIB-1553, due to the widespread usage of the current methods. For example, the "Translate to language" feature in Compass uses these methods and will have to be adapted.
- is depended on by
-
PHPLIB-1553 Deprecate Database::selectCollection and Client::selectDatabase
- Backlog