Skip to content

Commit

Permalink
Handle driver deprecation on Cursor::getId and `new UTCDateTime(str…
Browse files Browse the repository at this point in the history
…ing)` (#1418)

* PHPC-2412 PHPLIB-1489 Address CursorId in ChangeStream
* PHPC-2443 Handle deprecation on UTCDateTime from string
  • Loading branch information
GromNaN committed Sep 18, 2024
1 parent 45998dd commit b20703f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ChangeStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/GridFS/StreamWrapperFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down

0 comments on commit b20703f

Please sign in to comment.