Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

Commit eeba45f

Browse files
committed
PHPORM-50 Remove call to deprecated Collection::count for countDocuments
https://www.mongodb.com/docs/php-library/current/reference/method/MongoDBCollection-count/
1 parent 9d9c7c8 commit eeba45f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Query/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public function toMql(): array
273273
$aggregations = blank($this->aggregate['columns']) ? [] : $this->aggregate['columns'];
274274

275275
if (in_array('*', $aggregations) && $function == 'count') {
276-
return ['count' => [$wheres, []]];
276+
return ['countDocuments' => [$wheres, []]];
277277
} elseif ($function == 'count') {
278278
// Translate count into sum.
279279
$group['aggregate'] = ['$sum' => 1];

0 commit comments

Comments
 (0)