From 7ead6ff29f9d211aa24a25cc0c71d3ca3d9e6f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Wed, 18 Sep 2024 10:56:07 +0200 Subject: [PATCH] PHPLIB-1529 Remove usage of deprecated event getServer --- src/Operation/Watch.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Operation/Watch.php b/src/Operation/Watch.php index d8a1a9f27..7e192b298 100644 --- a/src/Operation/Watch.php +++ b/src/Operation/Watch.php @@ -317,7 +317,7 @@ final public function commandSucceeded(CommandSucceededEvent $event): void } if ( - $this->shouldCaptureOperationTime($event->getServer()) && + $this->shouldCaptureOperationTime() && isset($reply->operationTime) && $reply->operationTime instanceof TimestampInterface ) { $this->operationTime = $reply->operationTime; @@ -433,7 +433,7 @@ private function resume(array|object|null $resumeToken = null, bool $hasAdvanced * * @see https://github.com/mongodb/specifications/blob/master/source/change-streams/change-streams.rst#startatoperationtime */ - private function shouldCaptureOperationTime(Server $server): bool + private function shouldCaptureOperationTime(): bool { if ($this->hasResumed) { return false;