This is my connection code using old mongo php driver
$di->setShared('mongo', function () use ($config) {
$mongoConfig = $config->mongo->toArray();
$mongo = new MongoClient("mongodb://". $mongoConfig['host'] .":".$mongoConfig['port']);
return $mongo->selectDB($mongoConfig['dbname']);
});
$di->setShared('collectionManager', function(){
return new Phalcon\Mvc\Collection\Manager();
});
but the driver page display this warning
Warning This extension is deprecated. Instead, the MongoDB extension should be used.
How to convert the connection code for the new mongodb driver?