Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/APM/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down