diff --git a/src/APM/Command.php b/src/APM/Command.php index 2302d9d866..ab706afcf4 100644 --- a/src/APM/Command.php +++ b/src/APM/Command.php @@ -8,11 +8,8 @@ use MongoDB\Driver\Monitoring\CommandFailedEvent; use MongoDB\Driver\Monitoring\CommandStartedEvent; use MongoDB\Driver\Monitoring\CommandSucceededEvent; -use MongoDB\Driver\Server; use Throwable; -use function method_exists; - final class Command { private CommandStartedEvent $startedEvent; @@ -72,16 +69,6 @@ public function getRequestId(): string return $this->startedEvent->getRequestId(); } - /** @deprecated This method is failing with MongoDB Extension v2.0+, use getHost and getPort instead. */ - public function getServer(): Server - { - if (! method_exists($this->finishedEvent, 'getServer')) { - throw new LogicException('getServer() is not available in MongoDB Extension v2.0+'); - } - - return $this->finishedEvent->getServer(); - } - public function getPort(): int { return $this->finishedEvent->getPort();