Skip to content
PHP C M4 Groff JavaScript Shell Other
Latest commit 786a1a5 Apr 28, 2016 @jmikola jmikola Merge branch 'v1.1'
Failed to load latest commit information.
.travis.scripts PHPC-496: Revert "Temporary workaround for warning in mongoc" Jan 7, 2016
bin Encode special characters in commit messages for package.xml Dec 22, 2015
docs Fix BulkWrite::update() "multi" option usage in docs Feb 22, 2016
scripts Accept MongoDB 3.2 package repo public keys on test VM Dec 11, 2015
src PHPC-684: Report bypassDocumentValidation in BulkWrite debug output Apr 27, 2016
tests Merge branch 'v1.1' Apr 28, 2016
win32 Fix windows bson config Mar 25, 2015
.gitignore Added some more phpt test leftovers to .gitignore Dec 8, 2015
.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 HHVM-136: Make hippo and phongo README/CONTRIBUTING files consistent Nov 12, 2015
CREDITS Add CREDITS Nov 25, 2014
LICENSE Add Apache 2 license Dec 19, 2014
Makefile.frag Revise prep-release.php handling Dec 7, 2015
README.md Remove "beta" in doc. Dec 22, 2015
RELEASE-0 PHPC-366: Merge RELEASE-0.* release notes into RELEASE-0 Aug 21, 2015
RELEASE-1.0 Add 1.0.0 release notes Oct 30, 2015
RELEASE-1.1 Add 1.1.4 release notes Mar 10, 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-629: Update build configs for libmongoc Secure Channel Apr 18, 2016
config.w32 PHPC-629: Update build configs for libmongoc Secure Channel Apr 18, 2016
mkdocs.yml Update GitHub URLs for org change and repo rename Oct 23, 2015
phongo_compat.c PHPC-405: zval drop a level; zval*->zval, zval**->zval* Dec 16, 2015
phongo_compat.h PHPC-606: Use mongoc_client_get_server_description() Apr 25, 2016
php_bson.h PHPC-550: Always encode ODS field when serializing Persistable documents Feb 15, 2016
php_phongo.c PHPC-682: Do not use mongoc_bulk_operation_t private API Apr 27, 2016
php_phongo.h PHPC-682: Do not use mongoc_bulk_operation_t private API Apr 27, 2016
php_phongo_classes.h Fixed issues with PHP 7 and the new ReadConcern Dec 18, 2015
php_phongo_structs-5.h PHPC-684: Report bypassDocumentValidation in BulkWrite debug output Apr 27, 2016
php_phongo_structs-7.h PHPC-684: Report bypassDocumentValidation in BulkWrite debug output Apr 27, 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

Something went wrong with that request. Please try again.