CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 209
Releases: mongodb/mongo-php-driver
2.1.1
Compare
The PHP team is happy to announce that version 2.1.1 of the mongodb PHP extension is now available on PECL.
Release Highlights
This version upgrades the bundled libmongoc library to 1.30.5 to fix UTF-8 validation errors.
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation is available on PHP.net.
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb-2.1.1
or update with:
pecl upgrade mongodb-2.1.1
Windows binaries are attached to the GitHub release notes.
Assets 21
- sha256:ced5511c1f553c071c4a2bceebf6b2adc95ed57ac3c29c368b7771a4e5bcf0ed
2025-06-13T12:45:52Z - sha256:bea8eb86be7e301b1cd3935ee3ccfa052e410a7cfa404ae5ab4b11e4c99b8899
2025-06-13T12:45:11Z - sha256:9fd3ee1fe51b849b8e61cb274133f38518dfb668d3d679a9be568966053f1e94
2025-06-13T12:45:11Z - sha256:4e8f22d0e0b25ef41a4e1a5a6fefe7f92b5d8d8484b42eab933658d93f0b2514
2025-06-13T12:44:46Z - sha256:df6bb1e4fa29bdb51fb0b8c29bc2ed74a15faf855189262d98c6e83d8f5707ad
2025-06-13T12:44:29Z - sha256:01425317b819ab4a5a6daee4346e0d6c5129e90121c4ede7e4167dd3fd7877b4
2025-06-13T12:44:29Z - sha256:915af327e36728018a5e73983ad4df5555264679519959280f6790cf34ff5744
2025-06-13T12:44:13Z - sha256:bc4f4530184c247366bb36d677e253df3261cc56181266c70aebb4f82ca2af17
2025-06-13T12:44:43Z - sha256:dd7ccd7ddb52c9e02625b7fc05b365f64bc8ab0f2f7d92a7a99d9e50be2a29c3
2025-06-13T12:44:32Z - sha256:ea299f1002ade799b93e1457e507510cf7e7b4d24df34b2cc5ed6e2dc6e4f881
2025-06-13T12:45:04Z -
2025-06-13T12:41:18Z -
2025-06-13T12:41:18Z - Loading
1.21.1
Compare
The PHP team is happy to announce that version 1.21.1 of the mongodb PHP extension is now available on PECL.
Release Highlights
This version upgrades the bundled libmongoc library to 1.30.5 to fix UTF-8 validation errors.
A complete list of resolved issues in this release may be found in JIRA.
Please note that version 2 of the MongoDB Driver for PHP has been released. Support for version 1 of the driver will end on April 10, 2026.
Documentation
Documentation is available on PHP.net.
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb-1.21.1
or update with:
pecl upgrade mongodb-1.21.1
Windows binaries are attached to the GitHub release notes.
Assets 21
2.1.0
Compare
The PHP team is happy to announce that version 2.1.0 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release introduces support for the new bulkwrite
command added in MongoDB 8.0. The bundled libmongoc dependency is bumped to 1.30.4, and support for MongoDB 4.0 has been removed.
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation is available on PHP.net, including for the new BulkWriteCommand
class.
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb-2.1.0
or update with:
pecl upgrade mongodb-2.1.0
Windows binaries are attached to the GitHub release notes.
Assets 21
2.0.0
Compare
The PHP team is happy to announce that version 2.0.0 of the mongodb PHP extension is now available on PECL.
Release Highlights
This major release introduces a number of backwards-incompatible changes aimed at simplifying and modernizing the extension's API, cleaning up deprecated functionality, and improving type safety and runtime behavior.
API Cleanups and Removals
- Deprecated constructor options have been removed from the
Query
andManager
classes. - The
getServer()
method and internalManager
references have been removed from APM event classes to streamline event data structures. - The
CursorId
class has been removed;Cursor::getId()
now returns anInt64
directly. - Support for passing
WriteConcern
andReadPreference
objects directly to execute methods has been removed in favor of usingreadPreference
andwriteConcern
options. - Legacy exceptions such as
WriteException
andSSLConnectionException
have been removed.
Stronger Typing and Safer APIs
- The
UTCDateTime
constructor no longer accepts strings or floats. It now only accepts integer millisecond timestamps or instances ofDateTimeInterface
. WriteResult
getters will now throw exceptions when called on unacknowledged writes, making error states more explicit.- The
ReadPreference
class now requires string mode constants in its constructor. Support for legacy integer constants has been removed.
Deprecation and Legacy Cleanup
- The
Serializable
interface has been removed from BSON classes, following its deprecation in PHP 8.1. - All deprecated global BSON functions have been removed; users should use methods on the
Document
class instead. - Several configure options (
--with-libbson
,--with-libmongoc
,--enable-system-ciphers
,--with-openssl-dir
) have been removed to simplify the build process.
New Features and Improvements
CursorInterface
now extends PHP’s nativeIterator
interface.UTCDateTimeInterface
introduces a newtoDateTimeImmutable()
method.- URI options that expect booleans will now throw if a non-boolean value is provided, preventing silent misconfiguration.
Library Upgrades
- The extension now bundles libmongoc 1.30.3, bringing in the latest stability and feature improvements.
Compatibility updates
- This release requires an upgrade to the
mongodb/mongodb
Composer library, which introduces compatibility changes for this extension version. Be sure to update your Composer dependencies accordingly. - PHP 8.1+ Required: The minimum required PHP version is now 8.1, as support for older versions (PHP 7.4 and 8.0) has been dropped.
- MongoDB 4.2+ Required: Future versions of the library will require MongoDB 4.2 or later. MongoDB 4.0 support is deprecated.
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation is available on PHP.net.
Installation
You can either download and install the source manually, or install the extension via PECL:
pecl install mongodb-2.0.0
Or update an existing installation with:
pecl upgrade mongodb-2.0.0
Windows binaries are attached to the GitHub release notes.
Assets 21
1.21.0
Compare
The PHP team is happy to announce that version 1.21.0 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release adds a few quality of life features:
- Support for the
sort
option inreplaceOne
andupdateOne
operations was added to better control which documents get updated - When using array access on
MongoDB\BSON\Document
instances, integers are now accepted to access numeric keys in a BSON document
In this release, we also deprecated a number of features in preparation for an upcoming 2.0 release:
- Float arguments when constructing
MongoDB\BSON\UTCDateTime
are now deprecated - Passing a
WriteConcern
orReadPreference
instance to theexecuteQuery
,executeCommand
,executeReadCommand
,executeReadWriteCommand
, andexecuteWriteCommand
methods inMongoDB\Driver\Manager
andMongoDB\Driver\Server
is deprecated. Please use the correspondingwriteConcern
andreadPreference
options instead. - Passing a negative
limit
option to queries is now deprecated. Instead of negative limits, use a positivelimit
option and use thesingleBatch
option to receive to only receive a single batch of results.
This release drops support for PHP 7.4 and PHP 8.0 - PHP 8.1 is now the minimum version for the PHP driver. The libmongoc and libmongocrypt dependencies have been bumped to 1.30.1 and 1.12.0 respectively.
Support for MongoDB 4.0 is now deprecated. A future release of the driver will bump the minimum requirement to MongoDB 4.2.
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation is available on PHP.net.
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb-1.21.0
or update with:
pecl upgrade mongodb-1.21.0
Windows binaries are attached to the GitHub release notes.
Assets 21
1.20.1
Compare
The PHP team is happy to announce that version 1.20.1 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release updates the bundled versions of libmongoc and libmongocrypt to 1.28.1.
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation is available on PHP.net.
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb-1.20.1
or update with:
pecl upgrade mongodb-1.20.1
Windows binaries are attached to the GitHub release notes.
Assets 29
1.20.0
Compare
The PHP team is happy to announce that version 1.20.0 of the mongodb PHP extension is now available on PECL. This release introduces support for MongoDB 8.0.
Release Highlights
This release adds support for Queryable Encryption Range Queries when using MongoDB 8.0.
New getHost()
and getPort()
methods have been added to the CommandSucceededEvent and CommandFailedEvent classes. The getServer()
method has been deprecated.
This release updates the bundled versions of libmongoc and libmongocrypt to 1.28.0 and 1.11.0, respectively.
This release drops support for MongoDB 3.6. A future release will drop support for PHP 7.4 and 8.0.
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation is available on PHP.net.
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb-1.20.0
or update with:
pecl upgrade mongodb-1.20.0
Windows binaries are attached to the GitHub release notes.
Assets 29
1.19.4
Compare
The PHP team is happy to announce that version 1.19.4 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release fixes an issue when creating DateTime
instances from a MongoDB\BSON\UTCDateTime
instance for dates before the Unix Epoch, and optimises comparison of MongoDB\BSON\Int64
instances with scalar values to avoid casting, which could lose precision on 32-bit systems.
The bundled libmongoc and libmongocrypt versions were updated to 1.27.6 and 1.10.1 respectively.
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation is available on PHP.net.
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb-1.19.4
or update with:
pecl upgrade mongodb-1.19.4
Windows binaries are attached to the GitHub release notes.
Assets 25
1.19.3
Compare
The PHP team is happy to announce that version 1.19.3 of the mongodb PHP extension is now available on PECL.
Release Highlights
This version contains no user-facing changes but was made for internal compliance reasons.
Documentation
Documentation is available on PHP.net.
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb-1.19.3
or update with:
pecl upgrade mongodb-1.19.3
Windows binaries are attached to the GitHub release notes.
Assets 25
1.19.2
Compare
The PHP team is happy to announce that version 1.19.2 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release updates the bundled libmongoc version to 1.27.2.
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation is available on PHP.net.
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb-1.19.2
or update with:
pecl upgrade mongodb-1.19.2
Windows binaries are attached to the GitHub release notes.