Releases: mongodb/mongo-php-driver
1.5.1
The PHP team is happy to announce that version 1.5.1 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release addresses an issue with the default value of configure
options without explicit value.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?version=20987&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
1.5.0
The PHP team is happy to announce that version 1.5.0 of the mongodb PHP extension is now available on PECL. This release adds support for new features in MongoDB 4.0 and drops support for MongoDB 2.6 and earlier.
Release Highlights
This release adds support for MongoDB 4.0 and with that its main new feature: multi-document transactions for replica sets. The MongoDB\Driver\Session
class now has methods to start, commit, and abort transactions. After starting a transaction, the session object may be passed as an option to executed commands, queries, and write operations to associate those operations with the transaction. Other new server features, such as SCRAM-SHA-256 authentication, are also supported.
This driver release introduces a significant enhancement to the driver's type map functionality for BSON deserialization. In addition to configuring a PHP type for root documents, embedded documents, and arrays, it is now possible to configure types for specific field paths within the BSON document. More information on this may be found in the driver's BSON deserialization documentation.
The driver's exception hierarchy has been improved so that users can better identify errors originating from the server. If an exception is an instance of a MongoDB\Driver\Exception\ServerException
, the driver guarantees that its exception code originates from the server (it should match a known server error code). A new MongoDB\Driver\Exception\CommandException
has been introduced for command errors and provides access to the command's original response document.
Some configure
options for building the driver from source have changed. The internal --enable-developer-flags
and --enable-coverage
options have been renamed to --enable-mongodb-developer-flags
and --enable-mongodb-coverage
. --with-mongodb-sasl
no longer accepts a directory string as we now use pkg-config
to search for Cyrus SASL (as we do for SSL libraries). A --with-mongodb-icu
option has been introduced, which defaults to "auto". ICU is required for SASLPrep, which may used for SCRAM-SHA-256 authentication.
Lastly, this release introduces a MongoDB\BSON\Int64
class expressly to allow 64-bit integers from BSON to be represented on 32-bit platforms. Previously, the driver would throw an exception if a 64-bit integer would overflow PHP's native integer size. This new class enabled a 64-bit integer to be roundtripped through a 32-bit PHP environment without any loss of precision and also allows its value to be accessed as a string.
This release upgrades our libbson and libmongoc dependencies to 1.11.0. Support for MongoDB 2.6 and earlier has been removed.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=19415
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
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.4.4
The PHP team is happy to announce that version 1.4.4 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release addresses a compile time issue related to compiling with the bundled zlib in case your system does not have the library or headers. The new release additionally does no longer send a session ID with unacknowledged writes, as this is prohibited by the driver session specification.
We have also updated the documentation that macOS users install the driver from PECL now that Homebrew no longer has a PECL/mongodb extension formula.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=20432
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
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.4.3
The PHP team is happy to announce that version 1.4.3 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release addresses a handful of issues related to executing commands that yield a command cursor (e.g. aggregate
) and sessions on MongoDB 3.6. Previously, a getMore
on a command cursor could use a different session than the originating command, which could result in a runtime error if authentication was used. The driver will now ensure that command cursors always use the same session as the originating command.
When installing the driver on macOS, the driver will now default to Secure Transport instead of OpenSSL. This should alleviate issues some macOS High Sierra users have experienced related to BoringSSL being mistaken for OpenSSL at runtime. OpenSSL may still be used by building the driver from source and specifying --with-mongodb-ssl=openssl
as an option to configure
.
This release upgrades our libbson and libmongoc dependencies to 1.9.4.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=20310
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
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.4.2
The PHP team is happy to announce that version 1.4.2 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release addresses an issue where executing an aggregation pipeline on a sharded collection could trigger a client-side error due to an extra, internal field appearing in the server response.
This release upgrades our libbson and libmongoc dependencies to 1.9.3.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=20106
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
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.4.1
The PHP team is happy to announce that version 1.4.1 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release fixes build path issues related to SASL and zlib.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=19817
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
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.4.0
The PHP team is happy to announce that version 1.4.0 of the mongodb PHP extension is now available on PECL. This release adds support for new features in MongoDB 3.6 and drops support for MongoDB 2.4 and earlier.
Release Highlights
The executeBulkWrite()
, executeCommand()
, and executeQuery()
methods on the Manager and Server objects now accept an options array as their third argument. Previously, each method took a single, optional ReadPreference or WriteConcern object. The old signature is still supported for backwards compatibility.
New executeReadCommand()
, executeReadWriteCommand()
, and executeWriteCommand()
methods have been added to the Manager and Server objects. These new methods take an options array as their third argument and, in the absence of such options, will inherit the client's read concern and/or write concern (when applicable). This is in contrast to the original executeCommand()
method.
A MongoDB\Driver\Session
class has been introduced to support client sessions for MongoDB 3.6. Session objects may be created via a new startSession()
method on the Manager class. All methods that communicate with the server (i.e. all "execute" methods) now accept a "session" option. Presently, this option may be used for facilitating causally consistent reads.
When connected to MongoDB 3.6, the driver can now automatically retry failed write operations due to a network error or replica set failover. This functionality can be enabled by setting the retryWrites
URI option to true
.
MongoDB\Driver\BulkWrite::update()
now supports an arrayFilters
option, which may be used to specify which elements to modify in an array field. See Specify arrayFilters for Array Update Operations in the MongoDB manual for more information on this new feature.
This release adds new classes for deprecated BSON types (DBPointer, Symbol, and Undefined), which will allow the driver to round-trip documents containing such types. Previously, the driver would throw an exception when it encountered a deprecated type.
This release overhauls the way the extension configures SSL libraries and adds support for LibreSSL and macOS native SSL (Secure Transport). When building from source, configure
now supports a --with-mongodb-ssl
option. This defaults to auto
, which will first attempt to use OpenSSL, followed by LibreSSL, and finally Secure Transport (for macOS only, of course). Additionally, you may specify openssl
, libressl
, or darwin
to force a particular library, or specify no
to disable SSL entirely. Installing the driver via PECL will use the default auto
behavior.
MongoDB added support for compressing wire protocol communication with Snappy and zlib in versions 3.4 and 3.6, respectively. This release adds support for both Snappy and zlib, which will be checked for at build time. When connecting to MongoDB, the compressors
URI option may be used to enable specific compressors in a comma-delimited, prioritized list (e.g. "snappy,zlib"). By default, no compressors will be enabled. Messages are only compressed if the client and server share any compressors in common, and the compressor used in each direction will depend on the individual configuration of the server or driver. Windows builds of the driver do not currently support compression.
This release upgrades our libbson and libmongoc dependencies to 1.9.2. Support for MongoDB 2.4 and earlier has been removed.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=18383
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
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 this release:
1.4.0RC2
The PHP team is happy to announce that version 1.4.0RC2 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release fixes PECL packaging of libmongoc's bundled zlib library and adds support for specifying batchSize
for getMore
operations on command cursors (e.g. aggregate
cursors).
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=19986
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-beta
or update with:
pecl upgrade mongodb-beta
Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb
1.4.0RC1
The PHP team is happy to announce that version 1.4.0RC1 of the mongodb PHP extension is now available on PECL.
Release Highlights
This release overhauls the way the extension configures SSL libraries and adds support for LibreSSL and macOS native SSL (Secure Transport). When building from source, configure
now supports a --with-mongodb-ssl
option. This defaults to auto
, which will first attempt to use OpenSSL, followed by LibreSSL, and finally Secure Transport (for macOS only, of course). Additionally, you may specify openssl
, libressl
, or darwin
to force a particular library, or specify no
to disable SSL entirely.
This release upgrades our libbson and libmongoc dependencies to 1.9.2. Support for MongoDB 2.4 and earlier has been removed.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=19815
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
Note: documentation for new APIs in 1.4.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.4.0beta1
The PHP team is happy to announce that version 1.4.0beta1 of the mongodb PHP extension is now available on PECL. This release adds support for new features in MongoDB 3.6.
Release Highlights
The executeBulkWrite()
, executeCommand()
, and executeQuery()
methods on the Manager and Server objects now accept an options array as their third argument. Previously, each method took a single, optional ReadPreference or WriteConcern object. The old signature is still supported for backwards compatibility.
New executeReadCommand()
, executeReadWriteCommand()
, and executeWriteCommand()
methods have been added to the Manager and Server objects. These new methods take an options array as their third argument and, in the absence of such options, will inherit the client's read concern and/or write concern (when applicable). This is in contrast to the original executeCommand()
method.
A MongoDB\Driver\Session
class has been introduced to support client sessions for MongoDB 3.6. All methods that communicate with the server (i.e. all "execute" methods) now accept a "session" option. Presently, this option may be used for facilitating causally consistent reads.
When connected to MongoDB 3.6, the driver can now automatically retry failed write operations due to a network error or replica set failover. This functionality can be enabled by setting the retryWrites
URI option to true
.
This release adds new classes for deprecated BSON types (DBPointer, Symbol, and Undefined), which will allow the driver to round-trip documents containing such types. Previously, the driver would throw an exception when it encountered a deprecated type.
This release upgrades our libbson and libmongoc dependencies to 1.9.0. Support for MongoDB 2.4 and earlier has been removed.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=19688
Documentation
Documentation is available on PHP.net:
http://php.net/set.mongodb
Note: documentation for new APIs in 1.4.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