Skip to content

Commit

Permalink
Remove MongoSaver date patching
Browse files Browse the repository at this point in the history
It's already there by xhgui-collector 1.7.0:

- perftools/xhgui-collector#11
  • Loading branch information
glensc committed Apr 20, 2020
1 parent 82854c3 commit 8195e86
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"require": {
"php": "^5.3.0 || ^7.0 || ^8.0",
"perftools/xhgui-collector": "^1.1.0"
"perftools/xhgui-collector": "^1.8"
},
"suggest": {
"ext-mongo": "mongo extension (PHP>=5.3,<7.0)",
Expand Down
14 changes: 0 additions & 14 deletions src/Saver/MongoSaver.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,4 @@ public function isSupported()

return class_exists('MongoClient');
}

public function save(array $data)
{
$this->convertTimestamps($data['meta']);

return parent::save($data);
}

private function convertTimestamps(array &$meta)
{
$ts = $meta['request_ts_micro'];
$meta['request_ts'] = new MongoDate($ts['sec']);
$meta['request_ts_micro'] = new MongoDate($ts['sec'], $ts['usec']);
}
}

0 comments on commit 8195e86

Please sign in to comment.