Skip to content

Commit 3835977

Browse files
authored
support mongodb 2.0 (#356)
update composer to allow mongodb 2.0, and add an extra phan suppression for the now-removed CommandStartedEvent.getServer
1 parent 104aba2 commit 3835977

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Instrumentation/MongoDB/composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"license": "Apache-2.0",
99
"require": {
1010
"php": ">=8.1",
11-
"ext-mongodb": "^1.13",
11+
"ext-mongodb": "^1.13 | ^2.0",
1212
"ext-json": "*",
13-
"mongodb/mongodb": "^1.15",
13+
"mongodb/mongodb": "^1.15 || ^2.0",
1414
"open-telemetry/api": "^1.0",
1515
"open-telemetry/sem-conv": "^1.30"
1616
},

src/Instrumentation/MongoDB/src/MongoDBInstrumentationSubscriber.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function __construct(CachedInstrumentation $instrumentation, callable $co
6060

6161
/**
6262
* @psalm-suppress MixedAssignment,MixedArrayTypeCoercion,MixedArrayOffset,MixedArgument
63-
* @phan-suppress PhanDeprecatedFunctionInternal
63+
* @phan-suppress PhanDeprecatedFunctionInternal,PhanUndeclaredMethod
6464
*/
6565
public function commandStarted(CommandStartedEvent $event): void
6666
{

0 commit comments

Comments
 (0)