Skip to content

Commit 5b3f50a

Browse files
committed
Deprecate getAllCollections
1 parent 8a55690 commit 5b3f50a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: src/Schema/Builder.php

+7
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@
3030
use function sprintf;
3131
use function str_ends_with;
3232
use function substr;
33+
use function trigger_error;
3334
use function usort;
3435

36+
use const E_USER_DEPRECATED;
37+
3538
/** @property Connection $connection */
3639
class Builder extends \Illuminate\Database\Schema\Builder
3740
{
@@ -380,10 +383,14 @@ public function getCollection($name)
380383
/**
381384
* Get all of the collections names for the database.
382385
*
386+
* @deprecated
387+
*
383388
* @return array
384389
*/
385390
protected function getAllCollections()
386391
{
392+
trigger_error(sprintf('Since mongodb/laravel-mongodb:5.4, Method "%s()" is deprecated without replacement.', __METHOD__), E_USER_DEPRECATED);
393+
387394
$collections = [];
388395
foreach ($this->connection->getDatabase()->listCollections() as $collection) {
389396
$collections[] = $collection->getName();

0 commit comments

Comments
 (0)