diff --git a/src/Builder.php b/src/Builder.php index d120daf..ff3f003 100644 --- a/src/Builder.php +++ b/src/Builder.php @@ -462,7 +462,7 @@ public function aggregate($options, $extra) 'aggregate' => $options['table'], 'allowDiskUse' => true, 'pipeline' => $pipeline, - 'cursor' => \stdClass, + 'cursor' => new \stdClass, ]; foreach (['explain', 'collation', 'bypassDocumentValidation', 'readConcern'] as $option) { diff --git a/src/Connection.php b/src/Connection.php index 5c10b65..351e18c 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -12,7 +12,6 @@ use MongoDB\BSON\ObjectID; use MongoDB\Driver\BulkWrite; use MongoDB\Driver\Command; -use MongoDB\Driver\Cursor; use MongoDB\Driver\Exception\AuthenticationException; use MongoDB\Driver\Exception\BulkWriteException; use MongoDB\Driver\Exception\ConnectionException; @@ -22,7 +21,6 @@ use MongoDB\Driver\Query as MongoQuery; use MongoDB\Driver\ReadPreference; use MongoDB\Driver\WriteConcern; -use think\Collection; use think\Db; use think\Debug; use think\Exception;