Skip to content
C PHP Groff Shell JavaScript Python Batchfile
Latest commit 51707d8 @jmikola jmikola Merge pull request #217
Failed to load latest commit information.
.travis.scripts PHPC-496: Revert "Temporary workaround for warning in mongoc"
bin Encode special characters in commit messages for package.xml
docs Remove Manager::executeInsert() usage in ODS docs
scripts Accept MongoDB 3.2 package repo public keys on test VM
src Fixed PHPC-543: MongoDB\BSON\UTCDateTime on 32 bit platforms parse ar…
tests PHPC-515: Test that negative cursor limits return one batch
win32 Fix windows bson config
.gitignore Added some more phpt test leftovers to .gitignore
.gitmodules We are tracking 1.2.0-dev, not master!
.llvm-cov.sh Add travis and coveralls support
.travis.yml Enable PHP7 on Travis
CONTRIBUTING.md HHVM-136: Make hippo and phongo README/CONTRIBUTING files consistent
CREDITS Add CREDITS
LICENSE Add Apache 2 license
Makefile.frag Revise prep-release.php handling
README.md Remove "beta" in doc.
RELEASE-0 PHPC-366: Merge RELEASE-0.* release notes into RELEASE-0
RELEASE-1.0 Add 1.0.0 release notes
RELEASE-1.1 Add 1.1.2 release notes
Vagrantfile PHPC-279: Add 2.4 (and 2.6) to build matrix and ensure test suite com…
composer.json PHPC-247: Remove 'faker' as prerequisite from running our full test s…
config.m4 Improve other config.m4 check messages
config.w32 PHP7: Start a phongo_compat.c with things that shouldn't be done in h…
mkdocs.yml Update GitHub URLs for org change and repo rename
phongo_compat.c PHPC-405: zval drop a level; zval*->zval, zval**->zval*
phongo_compat.h PHPC-527: fix call to add_index_stringl
php_bson.h PHPC-529: Prefix BSON functions to avoid symbol conflicts
php_phongo.c PHPC-529: Prefix BSON functions to avoid symbol conflicts
php_phongo.h Back to -dev
php_phongo_classes.h Fixed issues with PHP 7 and the new ReadConcern
php_phongo_structs-5.h Fixed issues with PHP 7 and the new ReadConcern
php_phongo_structs-7.h Fixed issues with PHP 7 and the new ReadConcern

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.