Releases: mongodb/mongo-php-driver
1.6.1
The PHP team is happy to announce that version 1.6.1 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release fixes compilation for PHP 7.4 on Windows. The bundled libbson and libmongoc libraries were updated to 1.15.2.
A complete list of resolved issues in this release may be found at: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=24925
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
Feedback
We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb
or update with:
pecl upgrade mongodb
Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb
Thanks
Thanks for our community contributors for 1.6.1:
1.6.0
The PHP team is happy to announce that version 1.6.0 of the mongodb PHP extension is now available on PECL. This release adds support for new features in MongoDB 4.2.
Release Highlights
This release adds support for multi-document transactions on sharded clusters. When starting a transaction on a sharded cluster, the first operation executed within the transaction will pin the session to a specific mongos server, ensuring that all subsequent operations in the transaction will be sent to the same server. This server is exposed via the new MongoDB\Driver\Session::getServer()
method. The MongoDB\Driver\Session::isInTransaction()
method exposes whether a transaction is currently in progress (i.e. started but not yet committed or aborted).
The MongoDB\Driver\Exception\RuntimeException
class now exposes error labels via the hasErrorLabel()
method. This can be used to infer certain error categories, such as transient failures in transactions, which indicate that the transaction can be retried and may succeed on a subsequent attempt.
When connected to MongoDB 3.6 or later, the driver can now automatically retry queries and read commands executed with executeQuery()
and executeReadCommand()
, respectively, that fail due to a network error or replica set failover. Note that only initial queries and commands can be retried; getMore
commands issued during cursor iteration are not retryable. This feature is controlled by a new retryReads
URI option, which defaults to true
.
As of this release, retryable writes are now enabled by default. Note that retryable writes are fundamentally incompatible with the MMAPv1 storage engine. Applications still relying on MMAPv1 should consider upgrading to WiredTiger or otherwise disable retryable writes explicitly by setting the retryWrites
URI option to false
.
MongoDB 4.2 introduced aggregation pipelines for updates, which allows for more expressive update statements (e.g. conditional updates based on current field values). To support this feature, BulkWrite::update()
now accepts a pipeline array as its second argument.
Starting with this release, TLS options may be passed using the tls*
URI options in either the connection string or array options to MongoDB\Driver\Manager::construct()
. The use of driver options (i.e. third constructor argument) is still supported. The ca_dir
option, its deprecated alias capath
, and the crl_file
option are not supported as URI options and still need to be passed as driver options.
This release upgrades our libbson and libmongoc dependencies to 1.15.1. Support for PHP 5.5 has been removed. The extension now supports all PHP versions from 5.6 through 7.4.
A complete list of resolved issues in this release may be found at: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=20490
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
Feedback
We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb
or update with:
pecl upgrade mongodb
Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb
1.6.0RC1
The PHP team is happy to announce that the first 1.6 release candidate of the mongodb PHP extension is now available on PECL.
Release Highlights
This release completes support for all features introduced in MongoDB 4.2.
This release adds support for multi-document transactions on sharded clusters. Server selection logic in consuming libraries must be adapted to check for a pinned session and direct operations to that server.
Starting with this release, TLS options may be passed using the tls*
URI options in either the connection string or array options to \MongoDB\Driver\Manager::construct()
. The use of driver options (i.e. third constructor argument) is still supported. The ca_dir
option, its deprecated alias capath
, and the crl_file
option are not supported as URI options and still need to be passed as driver options.
This release also upgrades our bundled libbson and libmongoc libraries to 1.15.1.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=24084
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
Note: documentation for new APIs in 1.6.0 is still in progress.
Feedback
We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb-beta
or update with:
pecl upgrade mongodb-beta
Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb
1.6.0alpha3
The PHP team is happy to announce that the third 1.6 alpha version of the mongodb PHP extension is now available on PECL.
Release Highlights
When connected to MongoDB 3.6, the driver can now automatically retry queries and read commands executed with executeQuery()
and executeReadCommand()
, respectively, that fail due to a network error or replica set failover. Note that only initial queries and commands can be retried; getMore
commands issued during cursor iteration are not retryable. This feature is controlled by a new retryReads
URI option, which defaults to true
.
As of this release, retryable writes are now enabled by default. Note that retryable writes are fundamentally incompatible with the MMAPv1 storage engine. Applications still relying on MMAPv1 should consider upgrading to WiredTiger or otherwise disable retryable writes explicitly by setting the retryWrites
URI option to false
.
MongoDB 4.2 introduced aggregation pipelines for updates, which allows for more expressive update statements (e.g. conditional updates based on current field values). To support this feature, BulkWrite::update()
now accepts a pipeline array as its second argument.
This release also upgrades our bundled libbson and libmongoc libraries to 1.15.0.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=24041
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
Feedback
We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb
or update with:
pecl upgrade mongodb
Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb
1.5.5
The PHP team is happy to announce that version 1.5.5 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release addresses a memory leak introduced in the previous 1.5.4 release.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=23082
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
Feedback
We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb
or update with:
pecl upgrade mongodb
Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb
1.6.0alpha2
The PHP team is happy to announce that the second 1.6 alpha version of the mongodb PHP extension is now available on PECL.
Release Highlights
This release ensures that executeBulkWrite()
throws a BulkWriteException after any other runtime exception (e.g. ConnectionException). This ensures that any intermediate write result can still be accessed via BulkWriteException::getWriteResult()
. The original exception can also be accessed via the getPrevious()
method.
This release also upgrades our bundled libbson and libmongoc libraries to 1.14.0.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=22891
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
Feedback
We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb
or update with:
pecl upgrade mongodb
Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb
1.5.4
The PHP team is happy to announce that version 1.5.4 of the mongodb PHP extension is now available on PECL.
Release Highlights
The executeQuery()
method may now throw a CommandException instead of a ServerException, which will make the server's error document accessible to an application. As CommandException is a sub-class of ServerException, this is not a breaking change.
Session::startTransaction()
now raises an error when attempting to start a multi-document transaction on a sharded cluster. This is an intentional safeguard to prevent the 1.5.x PHP driver from starting a transaction on a MongoDB 4.2+ sharded cluster, since the driver does not implement other necessary features (e.g. mongos pinning). PHP driver 1.6.0 will fully support sharded transactions and have this restriction removed.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=22329
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
Feedback
We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb
or update with:
pecl upgrade mongodb
Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb
1.6.0alpha1
The PHP team is happy to announce that the first 1.6 alpha version of the mongodb PHP extension is now available on PECL.
Release Highlights
This release adds a Session::isInTransaction
method to indicate whether a transaction is active, and exposes error labels to improve on the syntax for retrying transactions upon transient failures.
We have added an interface for the Cursor class and __set_state()
support for ReadConcern
, ReadPreference
, and WriteConcern
. This release also contains our revamped test suite.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=21674
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
Feedback
We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb
or update with:
pecl upgrade mongodb
Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb
1.5.3
The PHP team is happy to announce that version 1.5.3 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release fixes a crash when deserializing BSON that contained an empty, deeply nested sub-document. It also resolves an outstanding bug where a MongoDB\Driver\Query
object's internal state might be modified by the executeQuery()
method (relevant for any users that re-use Query
objects). Lastly, OpenSSL 1.1 will now be detected even if pkg-config
is unavailable.
This release upgrades our bundled libbson and libmongoc libraries to 1.13.0, which notably adds support for LibreSSL 2.7+.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=21189
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
Feedback
We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb
or update with:
pecl upgrade mongodb
Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb
1.5.2
The PHP team is happy to announce that version 1.5.2 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release addresses a few bugs that were present in earlier releases. Among them: a use-after-free crash issue when using session methods after Session::endSession()
was called; an issue with passing SSL options both as part of the connection string and through $driverOptions
; and a build issue with OpenSSL 1.1 without pkg-config
being available.
This release upgrades our bundled libbson and libmongoc libraries to 1.12.0, and adds several test cases and testing platforms on Travis.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?version=21094&styleName=Html&projectId=12484
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
Feedback
We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6
Installation
You can either download and install the source manually, or you can install the extension with:
pecl install mongodb
or update with:
pecl upgrade mongodb
Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb