From 20870103c67e140e10958c77f35d5ff9533b09cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Wed, 18 Sep 2024 11:53:29 +0200 Subject: [PATCH 1/2] PHPLIB-1489 Address CursorId in ChangeStream --- src/ChangeStream.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeStream.php b/src/ChangeStream.php index 5a0a76924..7260f495d 100644 --- a/src/ChangeStream.php +++ b/src/ChangeStream.php @@ -261,7 +261,7 @@ private function onIteration(bool $incrementKey): void * have been received in the last response. Therefore, we can unset the * resumeCallable. This will free any reference to Watch as well as the * only reference to any implicit session created therein. */ - if ((string) $this->getCursorId() === '0') { + if ((string) $this->getCursorId(true) === '0') { $this->resumeCallable = null; } From bd7b4db0551b91c28b86b3659fa6250207f67d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Wed, 18 Sep 2024 11:54:50 +0200 Subject: [PATCH 2/2] PHPC-2443 Handle deprecation on UTCDateTime from string --- tests/GridFS/StreamWrapperFunctionalTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/GridFS/StreamWrapperFunctionalTest.php b/tests/GridFS/StreamWrapperFunctionalTest.php index 8aea21915..fc8c45523 100644 --- a/tests/GridFS/StreamWrapperFunctionalTest.php +++ b/tests/GridFS/StreamWrapperFunctionalTest.php @@ -46,7 +46,7 @@ public function setUp(): void parent::setUp(); $this->filesCollection->insertMany([ - ['_id' => 'length-10', 'length' => 10, 'chunkSize' => 4, 'uploadDate' => new UTCDateTime('1484202200000')], + ['_id' => 'length-10', 'length' => 10, 'chunkSize' => 4, 'uploadDate' => new UTCDateTime(1484202200000)], ]); $this->chunksCollection->insertMany([