Skip to content

Commit

Permalink
fixes query serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro Galli committed Nov 16, 2017
1 parent e662144 commit f389fb5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/DataCollector/MongoDbDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ public function collect(Request $request, Response $response, \Exception $except
/** @var Query $event */
$event = $this->logger->getLoggedEvent();

// with extension version under 1.2.4 some Mongo objects can't be automatically serialized
if (-1 === version_compare(phpversion('mongodb'), '1.2.4')) {
MongoQuerySerializer::serialize($event);
}
MongoQuerySerializer::serialize($event);

$this->data[self::QUERY_KEYWORD][] = $event;
$this->data[self::TIME_KEYWORD] += $event->getExecutionTime();
Expand Down

0 comments on commit f389fb5

Please sign in to comment.