github mongodb/mongo-php-driver 1.10.0

latest releases: 1.20.0, 1.19.4, 1.19.3...
3 years ago

The PHP team is happy to announce that version 1.10.0 of the mongodb PHP extension is now available on PECL. This release adds support for new features in MongoDB 5.0.

Release Highlights

The Manager constructor now supports a serverApi option in its $driverOptions parameter. A ServerApi instance can be provided to this option to utilize the new Stable API feature in MongoDB 5.0 and later.

Azure Key Vault and Google Cloud Platform KMS are now supported as keystores for client-side field-level encryption. They may be configured via kmsProviders field of the autoEncryption driver option when constructing a Manager.

The driver no longer prohibits the use of dots and dollars in document fields names. Restrictions are now entirely enforced by the server. Although MongoDB 5.0 has relaxed several restrictions, features such as escaping syntax for queries have yet to be implemented. As such, users are still not encouraged to use dots and dollars in field names.

Subscribers can now be registered directly on Manager objects via Manager::addSubscriber() and removeSubscriber() methods. Subscribers registered in this manner will only receive events associated with the Manager(s) with which they are registered. The global functions can still be used to register Subscribers that will receive events for all Managers.

The Manager constructor now supports a disableClientPersistence option in its $driverOptions parameter. Specifying true for this option will prevent the PHP driver from re-using a previously persisted libmongoc client for the Manager. A new client will be created internally and will also be destroyed along with the Manager object instead of being persisted for future use within the same PHP/worker process. Disabling client persistence is not generally recommended.

The Session class now reports information about a running transaction in its debug output (e.g. var_dump()). The CursorId class now supports var_export() and __set_state().

This release upgrades our libbson and libmongoc dependencies to 1.18.0. The libmongocrypt dependency has been upgraded to 1.2.1. Support for PHP 7.0 has been removed and the extension now requires PHP 7.1 or newer.

A complete list of resolved issues in this release may be found at: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=30261

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-1.10.0

or update with:

pecl upgrade mongodb-1.10.0

Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb

Thanks

Thanks for our community contributors for 1.10.0:

Don't miss a new mongo-php-driver release

NewReleases is sending notifications on new releases.