mongodb

MongoDB driver for PHP


The purpose of this driver is to provide exceptionally thin glue between MongoDB
and PHP, implementing only fundamental and performance-critical components
necessary to build a fully-functional MongoDB driver.

License: Apache License

Latest releases

Version Release Download
2.2.0 2026-02-11 mongodb-2.2.0.tgz
2.1.8 2026-02-04 mongodb-2.1.8.tgz
2.1.7 2026-01-28 mongodb-2.1.7.tgz
2.1.4 2025-10-08 mongodb-2.1.4.tgz
2.1.3 2025-10-07 mongodb-2.1.3.tgz
Show all releases

Changelog

Version Message
2.2.0 ## What's Changed
* PHPC-2435: Support libmongoc 2.0 by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1829
* PHPC-2591, PHPC-2594: Upgrade bundled libmongoc and libmongocrypt dependencies by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1842
* DRIVERS-3105 Add mention of semver in readme by @rishitb-mongodb in https://github.com/mongodb/mongo-php-driver/pull/1830
* Update installation instruction to use `pie` by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1846
* PHPC-2601: Add crypt_shared version to a manager's debug output by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1847
* Minor follow-up work for libmongoc 2 support by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1848
* use ZSTR_IS_INTERNED() by @remicollet in https://github.com/mongodb/mongo-php-driver/pull/1849
* Bump alcaeus/automatic-merge-up-action from 1.0.0 to 1.0.1 by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1851
* Fix dependabot configuration to only update single submodule by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1852
* Bump tests/drivers-evergreen-tools from `f53da28` to `36c35d0` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1856
* Bump actions/checkout from 4 to 5 by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1860
* Bump tests/drivers-evergreen-tools from `36c35d0` to `61eacf1` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1861
* Bump tests/drivers-evergreen-tools from `61eacf1` to `931726b` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1867
* Bump actions/setup-python from 5 to 6 by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1866
* Fix links to spec documents, migrated from rst to md by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1865
* Bump tests/drivers-evergreen-tools from `931726b` to `d7a7337` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1870
* Bump tests/drivers-evergreen-tools from `d7a7337` to `3b3f081` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1873
* Bump mongodb-labs/drivers-github-tools from 2 to 3 by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1872
* Upload test results to codecov.io by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1857
* PHPC-2474: Support Binary vector subtype by @jmikola in https://github.com/mongodb/mongo-php-driver/pull/1853
* Bump tests/drivers-evergreen-tools from `3b3f081` to `1dcbfe4` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1878
* Bump github/codeql-action from 3 to 4 by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1889
* PHPC-2627: Use appropriate return type for zend_object_iterator_funcs.valid by @jmikola in https://github.com/mongodb/mongo-php-driver/pull/1890
* PHPC-2638 and PHPC-2630: Bump to libmongoc 2.1.2 and libmongocrypt 1.16.0 by @jmikola in https://github.com/mongodb/mongo-php-driver/pull/1868
* Bump tests/drivers-evergreen-tools from `1dcbfe4` to `f8ab2a5` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1891
* PHPC-2634: Binary vector corpus tests by @jmikola in https://github.com/mongodb/mongo-php-driver/pull/1892
* Bump tests/drivers-evergreen-tools from `f8ab2a5` to `cb019f7` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1896
* Bump actions/checkout from 5 to 6 by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1895
* Bump tests/drivers-evergreen-tools from `cb019f7` to `c83e428` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1898
* Bump tests/drivers-evergreen-tools from `c83e428` to `c92d062` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1899
* Bump actions/cache from 4 to 5 by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1902
* Bump tests/drivers-evergreen-tools from `c92d062` to `ebe98d0` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1903
* PHPC-2654: Update to libmongoc 2.2.1 by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1900
* PHPC-2649: Update to libmongocrypt 1.17.0 by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1904
* Bump tests/drivers-evergreen-tools from `ebe98d0` to `514927f` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1905
* Bump tests/drivers-evergreen-tools from `514927f` to `61cb4e9` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1906
* Bump tests/drivers-evergreen-tools from `61cb4e9` to `5514d6a` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1908
* PHPC-2664: Drop Windows x86 builds by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1911
* Bump tests/drivers-evergreen-tools from `5514d6a` to `c7ec372` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1914
* Bump actions/download-artifact from 5 to 7 by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1913
* PHPC-2669: Compatibility for PHP 8.6-dev by @jmikola in https://github.com/mongodb/mongo-php-driver/pull/1929
* Bump mongodb-labs/drivers-github-tools from 2 to 3 by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1928
* Upgrade bundled dependencies by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1933
* Bump tests/drivers-evergreen-tools from `c7ec372` to `6005cf7` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1939

## New Contributors
* @rishitb-mongodb made their first contribution in https://github.com/mongodb/mongo-php-driver/pull/1830

**Full Changelog**: https://github.com/mongodb/mongo-php-driver/compare/2.1.8...2.2.0
2.1.8 ## What's Changed
* PHPC-2670: Upgrade libmongoc to 1.30.7 by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1930
* PHPC-2636: Respect libbson nesting limit when parsing PHP objects by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1934


**Full Changelog**: https://github.com/mongodb/mongo-php-driver/compare/2.1.7...2.1.8
2.1.7 ## What's Changed
* PHPC-2661: Use php-windows-builder for Windows extension builds by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1907
* Refactor release process to support php-windows-builder by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1916
* Fix broken release workflow by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1919
* Fix artifact signing by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1923
* Rename workflow file by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1926


**Full Changelog**: https://github.com/mongodb/mongo-php-driver/compare/2.1.4...2.1.7
2.1.4 ## What's Changed
* PHPC-2637: Update to libmongoc 1.30.6 (#1882) by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1887


**Full Changelog**: https://github.com/mongodb/mongo-php-driver/compare/2.1.3...2.1.4
2.1.3 ## What's Changed
* PHPC-2635: Remove serverless URIs from Atlas connectivity tests by @jmikola in https://github.com/mongodb/mongo-php-driver/pull/1879
* PHPC-2637: Update to libmongoc 1.30.6 by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1882


**Full Changelog**: https://github.com/mongodb/mongo-php-driver/compare/2.1.2...2.1.3
Show complete changelog