From 45998dde3a39206fc9c89736881576acf9fd6761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Wed, 18 Sep 2024 11:25:04 +0200 Subject: [PATCH] PHPLIB-1529 Remove usage of deprecated event getServer (#1415) --- 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 99e0f0380..f6f51f73d 100644 --- a/src/Operation/Watch.php +++ b/src/Operation/Watch.php @@ -324,7 +324,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; @@ -445,7 +445,7 @@ private function resume($resumeToken = null, bool $hasAdvanced = false): ChangeS * * @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;