mongodb / mongodb
MongoDB driver library
Installs: 47 297 944
Dependents: 592
Suggesters: 103
Security: 1
Stars: 1 600
Watchers: 72
Forks: 263
Open Issues: 4
Requires
- php: ^7.4 || ^8.0
- composer-runtime-api: ^2.0
- ext-hash: *
- ext-json: *
- ext-mongodb: ^1.20.0
- psr/log: ^1.1.4|^2|^3
- symfony/polyfill-php80: ^1.27
- symfony/polyfill-php81: ^1.27
Requires (Dev)
- doctrine/coding-standard: ^12.0
- rector/rector: ^1.1
- squizlabs/php_codesniffer: ^3.7
- symfony/phpunit-bridge: ^5.2
- vimeo/psalm: ^5.13
- v2.x-dev
- v1.x-dev
- v1.20.x-dev
- 1.20.0
- v1.19.x-dev
- 1.19.1
- 1.19.0
- v1.18.x-dev
- 1.18.0
- v1.17.x-dev
- 1.17.1
- 1.17.0
- v1.16.x-dev
- 1.16.1
- 1.16.0
- v1.15.x-dev
- 1.15.0
- v1.13.x-dev
- 1.13.1
- 1.13.0
- 1.13.0-beta1
- v1.12.x-dev
- 1.12.0
- v1.11.x-dev
- 1.11.0
- v1.10.x-dev
- 1.10.1
- 1.10.0
- v1.9.x-dev
- 1.9.0
- 1.9.0-alpha1
- v1.8.x-dev
- 1.8.0
- 1.8.0-RC1
- v1.7.x-dev
- 1.7.2
- 1.7.1
- 1.7.0
- 1.7.0-rc1
- 1.7.0-beta2
- 1.7.0-beta1
- v1.6.x-dev
- 1.6.1
- 1.6.0
- v1.5.x-dev
- 1.5.2
- 1.5.1
- 1.5.0
- v1.4.x-dev
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- v1.3.x-dev
- 1.3.2
- 1.3.1
- 1.3.0
- v1.2.x-dev
- 1.2.0
- 1.2.0-alpha1
- v1.1.x-dev
- 1.1.2
- 1.1.1
- 1.1.0
- 1.1.0-alpha1
- v1.0.x-dev
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 1.0.0-beta2
- 1.0.0-beta1
- 1.0.0-alpha1
- 0.2.0
- 0.1.0
- dev-merge-v1.x-into-v2.x-1733941438847
- dev-merge-v1.x-into-v2.x-1733928442997
- dev-merge-v1.x-into-v2.x-1733927715958
- dev-dependabot/submodules/tests/specifications-787bbe6
- dev-merge-v1.x-into-v2.x-1733175626763
- dev-merge-v1.x-into-v2.x-1733170629793
This package is auto-updated.
Last update: 2024-12-11 18:44:25 UTC
README
This library provides a high-level abstraction around the lower-level
PHP driver (mongodb
extension).
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 mongodb
extension may be found in
Architecture Overview.
Documentation
Installation
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
that the 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.
Release Integrity
Releases are created automatically and the resulting release tag is signed using
the PHP team's GPG key. To verify the
tag signature, download the key and import it using gpg
:
gpg --import php-driver.asc
Then, in a local clone, verify the signature of a given tag (e.g. 1.19.0
):
git show --show-signature 1.19.0
Note
Composer does not support verifying signatures as part of its installation process.
Reporting Issues
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.
Security Vulnerabilities
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
Development is tracked in the PHPLIB project in MongoDB's JIRA. Documentation for contributing to this project may be found in CONTRIBUTING.md.