Fix This Page
Navigation

PHP Libraries, Frameworks and Tools

Libraries for the mongodb Extension

Stand-alone Libraries

  • Mongo Queue PHP is a PHP message queue, which uses MongoDB as a backend.
  • Mongo PHP Adapter is a userland library designed to act as an adapter between applications relying on the legacy mongo extension and the new mongodb extension. It provides the API of the legacy driver on top of the new driver and library, which allows for compatibility with PHP 7.
  • Mongodm is a MongoDB ORM that includes support for references, embedded documents, and multilevel inheritance.
  • Yadm is a MongoDB ODM written for the mongodb extension. It is schema-less and supports fast object hydration and persistence, which makes it well-suited for modeling aggregation results.

Framework Integrations

  • Drupal
    • MongoDB integration for Drupal. This is a collection of several modules which allow sites to store different types of Drupal data in MongoDB. Support for the mongodb extension exists for Drupal 8.
  • Laravel
    • Laravel MongoDB: An Eloquent model and Query builder with support for MongoDB, using the original Laravel API. This library extends the original Laravel classes, so it uses exactly the same methods.
    • laravel-mongo: Convenience library for working with MongoDB documents in Laravel and the Lumen micro-framework. This library is built on top of the official MongoDB PHP library and includes an abstract model, a helper class for handling bulk writes, database wrappers for Laravel and Lumen, and some necessary helper functions.
  • Webiny
    • Entity Component is an ODM layer for MongoDB. Entity classes created using this component will serve as the main building blocks for modules, forms, tables, etc.
    • Mongo Component is an abstraction layer for MongoDB.
  • Yii2

Libraries for the mongo Extension

Stand-alone Libraries

  • Doctrine MongoDB ODM is a library that provides a PHP object mapping functionality for MongoDB. An underlying MongoDB abstraction layer exists as a separate project. A Symfony bundle and Zend Framework module for the ODM are also available. Although it is written for the legacy mongo extension, it is tested to work with the mongodb extension using Mongo PHP Adapter.
  • Mongator ODM is an easy, powerful, and ultrafast ODM for PHP and MongoDB. It is a fork of the Mandango ODM.
  • MongoFilesystem implements a hierarchical file system using MongoDB as a storage engine. The library uses GridFS for storing the files and a standard collection for the folder information. There is an object-oriented representation of the folders and files in the filesystem and rich API for performing operations. The library also implements renderers for JSON, HTML, and XML.
  • Mongofill is a pure PHP implementation of the mongo extension, which means that it can be used with HHVM. A separate mongofill-hhvm package provides a libbson extension for HHVM, which allows for more performant BSON encoding and decoding.
  • MongoQueue is a PHP queue that allows for moving tasks and jobs into an asynchronous process for completion in the background. The queue is managed by MongoDB.
  • MongoRecord is a PHP MongoDB ORM layer built on top of the mongo PECL extension.
  • PHPMongo ODM is an ODM with support for validation, relations, events, document versioning, and database migrations. Although it is written for the legacy mongo extension, it is tested to work with the mongodb extension using Mongo PHP Adapter.
  • Yamop is yet another MongoDB ODM for PHP. It works like the standard MongoDB PHP extension interface but returns objects instead of arrays (as ODM). A Laravel component is also available.

Framework Integrations

  • Drupal
    • MongoDB integration for Drupal. This is a collection of several modules which allow sites to store different types of Drupal data in MongoDB. Support for the mongo extension exists for Drupal 6, 7, and 8.
  • Kohana
    • MangoDB: Mango is an ORM and ActiveRecord-like library that takes full advantage of MongoDB’s features.
    • MongoDB PHP ODM is a simple but powerful set of wrappers for using MongoDB in PHP. It is designed for use with Kohana 3 but should integrate easily with any PHP application.
  • Phalcon
  • Yii 1.x
    • MongoYii is ActiveRecord ORM for Yii framework 1.x that supports MongoDB.
    • Yii MongoDB Driver is a MongoDB extension for Yii framework 1.x.

Miscellaneous Projects

  • PeclMongoPhpDoc provides skeleton classes for the mongo extension, which may be used to support autocomplete and inline documentation for IDEs.