You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecated: MongoDB\Driver\Cursor::getId(): The method "MongoDB\Driver\Cursor::getId" will no longer return a "MongoDB\Driver\CursorId" instance in the future. Pass "true" as argument to change to the new behavior and receive a "MongoDB\BSON\Int64" instance instead. in %s
Copy file name to clipboardExpand all lines: tests/functional/cursorid-001.phpt
+6-12Lines changed: 6 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -20,23 +20,17 @@ $query = new MongoDB\Driver\Query(array(), array(
20
20
21
21
$cursor = $manager->executeQuery(NS, $query);
22
22
23
-
$cursorid = $cursor->getId();
24
-
$s1 = (string)$cursorid;
25
-
var_dump(
26
-
$cursorid,
27
-
$s1
28
-
);
29
-
var_dump($s1 > 0);
23
+
$cursorid = $cursor->getId(true);
24
+
var_dump($cursorid);
25
+
var_dump($cursorid != 0);
30
26
31
27
?>
32
28
===DONE===
33
29
<?phpexit(0); ?>
34
30
--EXPECTF--
35
-
Deprecated: MongoDB\Driver\Cursor::getId(): The method "MongoDB\Driver\Cursor::getId" will no longer return a "MongoDB\Driver\CursorId" instance in the future. Pass "true" as argument to change to the new behavior and receive a "MongoDB\BSON\Int64" instance instead. in %s
0 commit comments