Repository navigation
Releases
2.5.2
The PHP team is happy to announce that version 2.5.2 of the MongoDB PHP library is now available.
Release Highlights
- PHPLIB-1996: PHP 8.6 compatibility migration by @Visualq in #2078
A complete list of resolved issues in this release may be found in Jira.
Documentation
Documentation for this library may be found in the PHP Library Manual.
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb:2.5.2
Installation instructions for the mongodb extension may be found in the PHP.net documentation.
Full Changelog: 2.5.1...2.5.2
2.5.1
The PHP team is happy to announce that version 2.5.1 of the MongoDB PHP library is now available.
Release Highlights
- Do not modify a shared stdClass operator when encoding
OutputWindowby @zigzagdev in #2000 - Fix explain empty filter by @zigzagdev in #2006
- Fix
CachingIterator::count()ending the current iteration by @zigzagdev in #2034 - PHPLIB-1977: Report writeConcernError for aggregate write stages by @GromNaN in #2061
- PHPLIB-1981: Fix array and stdClass queries being encoded as integer fields in QueryObject by @zigzagdev in #2033
- PHPLIB-1970: Remove deprecation of capped collection helpers in CollectionInfo by @GromNaN in #2011
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation for this library may be found in the PHP Library Manual.
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb:2.5.1
Installation instructions for the mongodb extension may be found in the PHP.net documentation.
Full Changelog: 2.5.0...2.5.1
1.21.6
The PHP team is happy to announce that version 1.21.6 of the MongoDB PHP library is now available.
Release Highlights
- Fix explain empty filter by @zigzagdev in #2006
- PHPLIB-1970: Remove deprecation of capped collection helpers in CollectionInfo by @GromNaN in #2011
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation for this library may be found in the PHP Library Manual.
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb:1.21.6
Installation instructions for the mongodb extension may be found in the PHP.net documentation.
Full Changelog: 1.21.5...1.21.6
2.5.0
The PHP team is happy to announce that version 2.5.0 of the MongoDB PHP library is now available.
Release Highlights
- PHPLIB-1879: Support Client Backpressure with baseBackoffMS by @paulinevos in #1966
- Improved performance for MongoDB 9.0's Intelligent Workload Management (IWM) by only retrying overload errors when expected to not worsen server conditions.
- PHPLIB-1947: Add array-shape types for Client constructor by @paulinevos and @GromNaN in #1991 and #1999
- Fix dangling GridFS stream by @alcaeus in #1986
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation for this library may be found in the PHP Library Manual.
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb:2.5.0
Installation instructions for the mongodb extension may be found in the PHP.net documentation.
Full Changelog: 2.4.2...2.5.0
2.4.2
The PHP team is happy to announce that version 2.4.2 of the MongoDB PHP library is now available.
Release Highlights
- PHPLIB-1929: Use exact match for file ID in GridFS queries CVE-2026-88023
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation for this library may be found in the PHP Library Manual.
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb:2.4.2
Installation instructions for the mongodb extension may be found in the PHP.net documentation.
1.21.5
The PHP team is happy to announce that version 1.21.5 of the MongoDB PHP library is now available.
Release Highlights
- PHPLIB-1929: Use exact match for file ID in GridFS queries CVE-2026-88023
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation for this library may be found in the PHP Library Manual.
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb:1.21.5
Installation instructions for the mongodb extension may be found in the PHP.net documentation.
2.4.1
The PHP team is happy to announce that version 2.4.1 of the MongoDB PHP library is now available.
Release Highlights
- PHPLIB-1927: Reject "." and NUL bytes in database and collection names by @GromNaN in #1967
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation for this library may be found in the PHP Library Manual.
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb:2.4.1
Installation instructions for the mongodb extension may be found in the PHP.net documentation.
1.21.4
The PHP team is happy to announce that version 1.21.4 of the MongoDB PHP library is now available.
Release Highlights
- PHPLIB-1927: Reject "." and NUL bytes in database and collection names by @GromNaN in #1968
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation for this library may be found in the PHP Library Manual.
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb:1.21.4
Installation instructions for the mongodb extension may be found in the PHP.net documentation.
2.4.0
The PHP team is happy to announce that version 2.4.0 of the MongoDB PHP library is now available.
Release Highlights
- PHPLIB-1624 Add
$rankFusionstage and$sigmoidexpression by @GromNaN in #1885 - PHPLIB-1755: Implement
$hashand$hexHashoperators by @paulinevos in #1887 - PHPLIB-1763 Add
$rerankstage by @GromNaN in #1892 - DRIVERS-3088: Support new search operators and argument by @paulinevos in #1894
- PHPLIB-1735 Implement
returnStoredSourcein$vectorSearchby @paulinevos in #1896 - PHPLIB-1386 Add $out stage with object encoding, db/coll fields, and timeseries support by @GromNaN in #1903
- PHPLIB-1691 Add $similarityCosine, $similarityDotProduct, and $similarityEuclidean expression operators by @GromNaN in #1902
- PHPLIB-1739 Add builder support for the vectorSearch search operator by @GromNaN in #1908
- PHPLIB-1761 Add builder support for $top, $bottom, $topN, $bottomN expression operators by @GromNaN in #1910
- PHPLIB-1795: Support
flatindexing method for vector search by @paulinevos in #1917 - PHPLIB-1715: Allow string to object conversion by @paulinevos in #1914
- PHPLIB-1844: Support range in PHP doc types by @paulinevos in #1916
- PHPLIB-1733: Support nested fields in
vectorSearchby @paulinevos in #1912 - PHPLIB-1715: Support string to array conversion by @paulinevos in #1915
- PHPLIB-1818: Support regex in $replaceOne find argument by @GromNaN in #1925
- PHPLIB-1841: Support
doesNotAffectarg for relevant operators by @paulinevos in #1927 - PHPLIB-1760: Support EJSON serialization/deserialization by @paulinevos in #1928
- PHPLIB-1771: Add
arrayIndexAssupport for$filterand$reduceoperators by @GromNaN in #1936 - PHPLIB-1734: Add query and model arguments for automated embedding to $vectorSearch stage by @GromNaN in #1937
- Reduce round trips in GridFS delete and chunk lookups by @GromNaN in #1959
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation for this library may be found in the PHP Library Manual.
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb:2.4.0
Installation instructions for the mongodb extension may be found in the PHP.net documentation.
2.3.0
The PHP team is happy to announce that version 2.3.0 of the MongoDB PHP library is now available.
Release Highlights
Added support for MongoDB 's Intelligent Workload Management (IWM) and ingress connection rate limiting features. The driver now gracefully handles write-blocking scenarios and optimizes connection establishment during high-load conditions to maintain application availability. These features will be functional with MongoDB Atlas Server Version 9.0 and above.
- Support
mongodb+srvconnection string in connection test tool by @alcaeus in #1841 - PHPLIB-1778: Unskip large encryption spec test by @alcaeus in #1855
- PHPLIB-1798 Extract MQL definition into a submodule for builder generator by @GromNaN in #1851
- Require
ext-mongodb: ^2.3and test against dev branch by @GromNaN in #1879 - PHPLIB-1714: Implement backoff for withTransaction by @alcaeus in #1846
- PHPLIB-1396: Implement convenient transactions prose tests by @alcaeus in #1847
- PHPLIB-1719 Exponential backoff and jitter in retry loops by @GromNaN in #1880
A complete list of resolved issues in this release may be found in JIRA.
Server compatibility
MongoDB 4.4+ Required: Future versions of the library will require MongoDB 4.4 or later. MongoDB 4.2 support is deprecated.
The Client Backpressure features will be functional with MongoDB Atlas Server Version 9.0 and above.
Documentation
Documentation for this library may be found in the PHP Library Manual.
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb:2.3.0
Installation instructions for the mongodb extension may be found in the PHP.net documentation.