Skip to content

Commit 0bb0cc1

Browse files
committed
Fix deprecated usage of mongodb driver count method.
1 parent ee6766f commit 0bb0cc1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"require": {
2727
"php": "^7.2 || ^8.0",
2828
"ext-mongodb": "*",
29-
"mongodb/mongodb": "^1.1"
29+
"mongodb/mongodb": "^1.4"
3030
},
3131
"require-dev": {
3232
"phpunit/phpunit": "^8",

src/AbstractQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ final public function count(array $query, bool $running = null) : int
198198
$totalQuery['earliestGet'] = [$key => new UTCDateTime((int)(microtime(true) * 1000))];
199199
}
200200

201-
return $this->collection->count($this->buildPayloadQuery($totalQuery, $query));
201+
return $this->collection->countDocuments($this->buildPayloadQuery($totalQuery, $query));
202202
}
203203

204204
/**

0 commit comments

Comments
 (0)