Skip to content

Commit fd8db91

Browse files
authored
Fix data collector (#23)
builderEncoder uses a WeakMap that cannot be serialized
1 parent af537c2 commit fd8db91

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
],
1414
"require": {
1515
"php": ">=8.1",
16-
"mongodb/mongodb": "^1.17",
16+
"ext-mongodb": "^1.21",
17+
"mongodb/mongodb": "^1.21",
1718
"symfony/config": "^6.3 || ^7.0",
1819
"symfony/console": "^6.3 || ^7.0",
1920
"symfony/dependency-injection": "^6.3.5 || ^7.0",

src/DataCollector/MongoDBDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function lateCollect(): void
8383
(array) $client->getManager()->executeCommand('admin', new Command(['buildInfo' => 1]))->toArray()[0],
8484
['versionArray' => 0, 'ok' => 0],
8585
),
86-
'clientInfo' => array_diff_key($client->__debugInfo(), ['manager' => 0]),
86+
'clientInfo' => array_diff_key($client->__debugInfo(), ['manager' => 0, 'builderEncoder' => 0]),
8787
];
8888
}
8989

0 commit comments

Comments
 (0)