Before migrating over to MySQL as the officially “blessed” database engine, Known previously used MongoDB.
The support for this was provided by the PECL extension ‘mongo’, which while supported in PHP5.4, was later deprecated and completely removed in PHP 7. This left early adopters, like myself, no upgrade path to PHP 7.
The end goal I believe, is to build a bullet proof import/export function into Known and get everyone over onto MySql, however in order to give us a little more runway, I took the opportunity to rewrite the mongo database driver to use the newer (and supported) MongoDB driver.
This pull request completely replaces the existing mongo code with a backwards compatible version built on the newer MongoDB driver, handling both database and GridFS.
Of course, while it does pass unit tests, this is a big change, so I encourage existing mongo users to kick it about for a bit, and also be sure to take a full backup of your existing stuff before rolling out this change.
Let me know your thoughts!