PHP 7.0 & Phalcon 3.0 & MongoDB\Driver\Manager

I've seen a few posts here and there, did my google search, and understand that from PHP 5.X to PHP 7.X the MongoDB API has changed. AFAIK, Phalcon does not yet support it? I am looking at starting a new project, and right now its not so much of an issue, rather than a question; will newer version of Phalcon support MongoDB? I am using the Phalcon package, and using MongoDB\Driver\Manager hints that I won't be able to use Models at all?

i see source code .

i find a row code :

let mongo = new \MongoClient(server);

so, Phalcon does not support MongoDB extension.

You can write a custom mongodb driver


Here is a quick guide to using the MongoDB with Phalcon 3.x

1) Download the Incubator. Instructions here: under "Autoloading from the Incubator".

2) Change your DI to use the new Mongo adapter

// shared mongo service 
$di->set('mongo', function() {

    $mongo = new \Phalcon\Db\Adapter\Mongo\Client("mongodb://");
    return $mongo->selectDB('dbname');

}, true);

3) Change your Models to extend the new MongoCollection class

class SomeModel extends \Phalcon\Db\Mvc\MongoCollection

That should do it.