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
| Version | Release | Download |
| 2.3.1 | 2026-04-30 | mongodb-2.3.1.tgz |
| 2.3.0 | 2026-04-28 | mongodb-2.3.0.tgz |
| 2.2.1 | 2026-02-13 | mongodb-2.2.1.tgz |
| 2.2.0 | 2026-02-11 | mongodb-2.2.0.tgz |
| 2.1.8 | 2026-02-04 | mongodb-2.1.8.tgz |
| Version | Message |
| 2.3.1 |
## What's Changed * PHPC-2714: Fix in-tree PHP builds by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/2005 **Full Changelog**: https://github.com/mongodb/mongo-php-driver/compare/2.3.0...2.3.1 |
| 2.3.0 |
## What's Changed * Bump tests/drivers-evergreen-tools from `6005cf7` to `f3720c0` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1945 * PHPC-2679: Test PHP 8.5 on Evergreen by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1938 * [PHPC-2647] Out-of-source build: Don't necessarily generate flies in the source tree by @vector-of-bool in https://github.com/mongodb/mongo-php-driver/pull/1893 * Bump tests/drivers-evergreen-tools from `f3720c0` to `b26580a` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1947 * Add Jérôme and Pauline as maintainers by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1949 * Bump tests/drivers-evergreen-tools from `b26580a` to `2fd7b46` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1950 * PHPC-1971: Use debug builds of PHP for testing by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1952 * Make bson-enum_error resilient to PHP 8.6 interface handler order by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1953 * Stabilize enum interface error handling and tests by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1954 * PHPC-2215: Replace php_phongo prefix by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1955 * Add configuration for Claude Code by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1956 * Harden code after AI-assisted review by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1957 * PHPC-1988: base64 encode binary data when debugging by @paulinevos in https://github.com/mongodb/mongo-php-driver/pull/1960 * PHPC-2160: Extract calls to bsonSerialize and remove unnecessary check function by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1958 * Use `zend_array_is_list` in `phongo_is_array_or_document` by @paulinevos in https://github.com/mongodb/mongo-php-driver/pull/1961 * PHPC-2024: Introduce macros for simpler class declarations by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1959 * PHPC-2530: Deprecate hedged reads by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1962 * PHPC-2486: Require non-null namespace and database arguments in Manager by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1963 * Avoid string length calculations for bson_append calls by @paulinevos in https://github.com/mongodb/mongo-php-driver/pull/1964 * Bump tests/drivers-evergreen-tools from `2fd7b46` to `6b45ce1` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1967 * Bump actions/download-artifact from 7 to 8 by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1948 * Improve testing notes in CLAUDE.md by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1970 * Add tests to improve coverage of untested or under-tested APIs by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1975 * PHPC-2500: Skip errorLabels assignment for non-RuntimeException exceptions by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1974 * Make bson-enum_error resilient to PHP 8.6 interface handler order by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1977 * Add macros to simplify handling of internal structs by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1965 * Use DBX PR app to create merge-up pull requests by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1972 * Merge v2.2 into v2.x by @mongodb-drivers-pr-bot[bot] in https://github.com/mongodb/mongo-php-driver/pull/1980 * PHPC-2699: Add typed, read-only properties for value objects and events by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1979 * PHPC-2700: Fix cloning Javascript objects without a scope by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1987 * Use `json_decode` to produce a non-interned string in typeMap test by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1985 * Generate legacy arginfo for older PHP versions by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1981 * Remove `phongo_write_concern_to_zval` by @paulinevos in https://github.com/mongodb/mongo-php-driver/pull/1983 * PHPC-2699: Rename durationMicros properties by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1991 * PHPC-1519: Remove phongo_server_to_zval and include Server objects in Manager debug output by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1988 * Remove tests that only ran on PHP 7 and clean up version-specific SKIPIFs by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1986 * PHPC-2699: Add readonly properties to WriteConcernError class by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1990 * Remove extra structs for objects with properties by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1992 * PHPC-1514 Remove `php_phongo_read_concern_to_zval` by @paulinevos in https://github.com/mongodb/mongo-php-driver/pull/1989 * PHPC-2702 PHPC-2698 Upgrade libmongoc to 2.3.0 and libmongocrypt to 1.17.3 by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1994 * PHPC-2695 Replace deprecated bson_append_array_begin with bson_append_array_unsafe_begin by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1996 * Relax check on internal object id, not relevant for the test by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1998 * Remove unnecessary structs for BSON MinKey and MaxKey classes by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1999 * PHPC-2660 Test that killCursors is sent after a connection error during getMore by @GromNaN in https://github.com/mongodb/mongo-php-driver/pull/1997 * Bump tests/drivers-evergreen-tools from `6b45ce1` to `4b02eb0` by @dependabot[bot] in https://github.com/mongodb/mongo-php-driver/pull/2000 ## New Contributors * @vector-of-bool made their first contribution in https://github.com/mongodb/mongo-php-driver/pull/1893 * @paulinevos made their first contribution in https://github.com/mongodb/mongo-php-driver/pull/1960 * @mongodb-drivers-pr-bot[bot] made their first contribution in https://github.com/mongodb/mongo-php-driver/pull/1980 **Full Changelog**: https://github.com/mongodb/mongo-php-driver/compare/2.2.1...2.3.0 |
| 2.2.1 |
## What's Changed * PHPC-2689: Throw LogicException in Binary::getVectorType() and toArray() by @jmikola in https://github.com/mongodb/mongo-php-driver/pull/1941 * Mark Jeremy Mikola as inactive by @alcaeus in https://github.com/mongodb/mongo-php-driver/pull/1943 **Full Changelog**: https://github.com/mongodb/mongo-php-driver/compare/2.2.0...2.2.1 |
| 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 |