PHP C M4 JavaScript Shell Makefile Other
Latest commit 33b9e5f Nov 30, 2016 @jmikola jmikola Back to -dev
Permalink
Failed to load latest commit information.
.github Remove PR issue template Aug 31, 2016
.travis.scripts PHPC-496: Revert "Temporary workaround for warning in mongoc" Jan 7, 2016
bin Fixed CREDITS file and include it in package.xml too Nov 29, 2016
scripts Accept MongoDB 3.2 package repo public keys on test VM Dec 11, 2015
src Ensure php_phongo_bson_visit_int64() has TSRMLS vars if needed Nov 29, 2016
tests PHPC-654: Javascript comparison handler Nov 28, 2016
.gitignore PHPC-584: Remove MkDocs documentation Oct 26, 2016
.gitmodules We are tracking 1.2.0-dev, not master! Jul 15, 2015
.llvm-cov.sh Add travis and coveralls support Jun 20, 2014
.travis.yml Enable PHP7 on Travis Dec 16, 2015
CONTRIBUTING.md Issues not are not "Fixed" should be unassociated with release versions Nov 29, 2016
CREDITS Fixed CREDITS file and include it in package.xml too Nov 29, 2016
LICENSE Add Apache 2 license Dec 19, 2014
Makefile.frag PHPC-584: Remove MkDocs documentation Oct 26, 2016
README.md PHPC-584: Remove MkDocs documentation Oct 26, 2016
THIRD_PARTY_NOTICES PHPC-799: Add THIRD_PARTY_NOTICES file Nov 22, 2016
Vagrantfile Increased vagrant memory usage for virtual box to 2G Apr 20, 2016
composer.json PHPC-247: Remove 'faker' as prerequisite from running our full test s… Apr 23, 2015
config.m4 PHPC-718: Define extension dependencies Nov 8, 2016
config.w32 PHPC-718: Define extension dependencies Nov 8, 2016
phongo_compat.c Remove unused functions and macros Sep 21, 2016
phongo_compat.h PHPC-313: BSON should throw when encountering 64-bit integer on 32-bi… Oct 18, 2016
php_bson.h PHPC-533: Remove PHONGO_API macro for exported functions Nov 28, 2016
php_phongo.c PHPC-533: Remove PHONGO_API macro for exported functions Nov 28, 2016
php_phongo.h Back to -dev Nov 29, 2016
php_phongo_classes.h PHPC-619: Implement Decimal128 type (again) Aug 31, 2016
php_phongo_structs.h PHPC-783: Use mongoc_collection_find_with_opts() for Query exec Sep 20, 2016

README.md

pecl/mongodb (MongoDB driver for PHP)

Build Status Coverage Status

This is the low-level PHP driver for MongoDB. The API is the same as the HHVM driver for MongoDB. The documentation for both of them is the same, and can be found at http://docs.php.net/manual/en/set.mongodb.php

The driver is written to be a bare bone layer to talk to MongoDB, and therefore misses many convenience features. Instead, these convenience methods have been split out into a layer written in PHP, the MongoDB Library. Using this library should be your preferred way of interacting with MongoDB.

Please note that the new HHVM and PHP drivers implement a different API from the legacy driver at http://pecl.php.net/package/mongo; therefore existing libraries that use the legacy driver (e.g. Doctrine MongoDB's ODM) will not work with the new drivers.

In the long run, we hope that userland packages will be built atop this driver to implement various APIs (e.g. a BC layer for the existing driver, new fluent interfaces), management utilities (for creating admin utilities and cluster management applications), and other interesting libraries.

Documentation

Installation

To build and install the driver:

$ pecl install mongodb
$ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`

We recommend using this extension in conjunction with our userland library, which is distributed as mongodb/mongodb for Composer.

Contributing

See CONTRIBUTING.md

Related Projects