MongoDB driver library
Installs: 30 008 880
Stars: 1 557
Open Issues: 9
- php: ^7.2 || ^8.0
- ext-hash: *
- ext-json: *
- ext-mongodb: ^1.15.0
- jean85/pretty-package-versions: ^1.2 || ^2.0.1
- symfony/polyfill-php80: ^1.19
- doctrine/coding-standard: ^9.0
- squizlabs/php_codesniffer: ^3.6
- symfony/phpunit-bridge: ^5.2
- vimeo/psalm: ^4.28
- dev-master / 1.16.x-dev
This package is auto-updated.
Last update: 2023-05-26 11:13:01 UTC
This library provides a high-level abstraction around the lower-level
PHP driver (
While the extension provides a limited API for executing commands, queries, and write operations, this library implements a full-featured API similar to that of other MongoDB drivers. It contains abstractions for client, database, and collection objects, and provides methods for CRUD operations and common commands (e.g. index and collection management).
If you are developing an application with MongoDB, you should consider using this library, or another high-level abstraction, instead of the extension alone.
Additional information about the architecture of this library and the
extension may be found in
The preferred method of installing this library is with Composer by running the following from your project root:
$ composer require mongodb/mongodb
Additional installation instructions may be found in the library documentation.
Since this library is a high-level abstraction for the driver, it also requires
mongodb extension be installed:
$ pecl install mongodb $ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
Additional installation instructions for the extension may be found in its PHP.net documentation.
Issues pertaining to the library should be reported in the PHPLIB project in MongoDB's JIRA. Extension-related issues should be reported in the PHPC project.
For general questions and support requests, please use one of MongoDB's Technical Support channels.
If you've identified a security vulnerability in a driver or any other MongoDB project, please report it according to the instructions in Create a Vulnerability Report.
Development is tracked in the PHPLIB project in MongoDB's JIRA. Documentation for contributing to this project may be found in CONTRIBUTING.md.