Skip to content

Commit e2a068a

Browse files
authored
DOCSP-46918: Rename Connection::getMongoDB to getDatabase (#3292)
2 parents c97005e + 4891b5b commit e2a068a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/database-collection.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,13 @@ methods in your application:
219219
Example
220220
```````
221221

222-
The following example accesses a database connection, then calls the
222+
The following example accesses the database of the connection, then calls the
223223
``listCollections()`` query builder method to retrieve information about
224224
the collections in the database:
225225

226226
.. code-block:: php
227227

228-
$collections = DB::connection('mongodb')->getMongoDB()->listCollections();
228+
$collections = DB::connection('mongodb')->getDatabase()->listCollections();
229229

230230
List Collection Fields
231231
----------------------

docs/filesystems.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ In this case, the options ``connection`` and ``database`` are ignored:
9494
'driver' => 'gridfs',
9595
'bucket' => static function (Application $app): Bucket {
9696
return $app['db']->connection('mongodb')
97-
->getMongoDB()
97+
->getDatabase()
9898
->selectGridFSBucket([
9999
'bucketName' => 'avatars',
100100
'chunkSizeBytes' => 261120,
@@ -150,7 +150,7 @@ if you need to work with revisions, as shown in the following code:
150150

151151
// Create a bucket service from the MongoDB connection
152152
/** @var \MongoDB\GridFS\Bucket $bucket */
153-
$bucket = $app['db']->connection('mongodb')->getMongoDB()->selectGridFSBucket();
153+
$bucket = $app['db']->connection('mongodb')->getDatabase()->selectGridFSBucket();
154154

155155
// Download the last but one version of a file
156156
$bucket->openDownloadStreamByName('hello.txt', ['revision' => -2])

0 commit comments

Comments
 (0)