Skip to content

Commit c0a7e53

Browse files
authored
Remove APM\Command::getServer() (#2891)
Use getHost and getPort instead
1 parent b102f85 commit c0a7e53

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/APM/Command.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
use MongoDB\Driver\Monitoring\CommandFailedEvent;
99
use MongoDB\Driver\Monitoring\CommandStartedEvent;
1010
use MongoDB\Driver\Monitoring\CommandSucceededEvent;
11-
use MongoDB\Driver\Server;
1211
use Throwable;
1312

14-
use function method_exists;
15-
1613
final class Command
1714
{
1815
private CommandStartedEvent $startedEvent;
@@ -72,16 +69,6 @@ public function getRequestId(): string
7269
return $this->startedEvent->getRequestId();
7370
}
7471

75-
/** @deprecated This method is failing with MongoDB Extension v2.0+, use getHost and getPort instead. */
76-
public function getServer(): Server
77-
{
78-
if (! method_exists($this->finishedEvent, 'getServer')) {
79-
throw new LogicException('getServer() is not available in MongoDB Extension v2.0+');
80-
}
81-
82-
return $this->finishedEvent->getServer();
83-
}
84-
8572
public function getPort(): int
8673
{
8774
return $this->finishedEvent->getPort();

0 commit comments

Comments
 (0)