Skip to content

Commit b20703f

Browse files
authored
Handle driver deprecation on Cursor::getId and new UTCDateTime(string) (#1418)
* PHPC-2412 PHPLIB-1489 Address CursorId in ChangeStream * PHPC-2443 Handle deprecation on UTCDateTime from string
1 parent 45998dd commit b20703f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ChangeStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ private function onIteration(bool $incrementKey): void
261261
* have been received in the last response. Therefore, we can unset the
262262
* resumeCallable. This will free any reference to Watch as well as the
263263
* only reference to any implicit session created therein. */
264-
if ((string) $this->getCursorId() === '0') {
264+
if ((string) $this->getCursorId(true) === '0') {
265265
$this->resumeCallable = null;
266266
}
267267

tests/GridFS/StreamWrapperFunctionalTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function setUp(): void
4646
parent::setUp();
4747

4848
$this->filesCollection->insertMany([
49-
['_id' => 'length-10', 'length' => 10, 'chunkSize' => 4, 'uploadDate' => new UTCDateTime('1484202200000')],
49+
['_id' => 'length-10', 'length' => 10, 'chunkSize' => 4, 'uploadDate' => new UTCDateTime(1484202200000)],
5050
]);
5151

5252
$this->chunksCollection->insertMany([

0 commit comments

Comments
 (0)