Skip to content

1.4.0beta1

Pre-release
Pre-release
Compare
Choose a tag to compare
@jmikola jmikola released this 24 Dec 09:05

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