MongoDB PHP Driver 1.4.0 released

10 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Jeremy Mikola

ungelesen,
08.02.2018, 23:08:2008.02.18
an mongodb-...@googlegroups.com, mongod...@googlegroups.com
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:



Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten