Skip to content

Commit c49d20d

Browse files
committed
Update diagnostic criteria
1 parent cf11f81 commit c49d20d

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/DataCollector/ConnectionDiagnostic.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
use function array_flip;
1313
use function array_intersect_key;
14-
use function in_array;
1514
use function iterator_count;
1615
use function version_compare;
1716

@@ -25,12 +24,6 @@ class ConnectionDiagnostic
2524
'tlsOptions',
2625
];
2726

28-
private const SUPPORTED_SERVER_TYPES = [
29-
Server::TYPE_MONGOS,
30-
Server::TYPE_RS_PRIMARY,
31-
Server::TYPE_RS_SECONDARY,
32-
];
33-
3427
public function __construct(
3528
private readonly Client $client,
3629
private readonly array $driverOptions,
@@ -71,9 +64,9 @@ public function getServerInfo(): array
7164

7265
return [
7366
'topologyName' => $this->getTopologyType($server),
74-
'topologySupported' => in_array($server->getType(), self::SUPPORTED_SERVER_TYPES),
67+
'topologySupported' => $server->getType() !== Server::TYPE_STANDALONE,
7568
'version' => $version,
76-
'versionSupported' => $version ? version_compare($version, '8.0.0', '>=') : false,
69+
'versionSupported' => $version ? version_compare($version, '7.0.0', '>=') : false,
7770
];
7871
}
7972

0 commit comments

Comments
 (0)