1.3.0
The PHP team is happy to announce that version 1.3.0 of the mongodb PHP extension is now available on PECL.
Release Highlights
The driver now provides an API for monitoring database commands, which complies with the Command Monitoring specification. This API exists within the MongoDB\Driver\Monitoring
namespace and is demonstrated in the Application Performance Monitoring (APM) tutorial.
New BSON functions have been introduced to support output formats defined in the Extended JSON specification:
The MongoDB\BSON\fromJSON()
function has been enhanced to parse canonical and relaxed extended JSON, in addition to the legacy format. The jsonSerialize()
method on BSON classes implementing JsonSerializable has not changed; those methods continue to return data in the legacy format.
The ObjectID class has been renamed to ObjectId. As class names in PHP are case-insensitive, this change may go unnoticed; however, users are encouraged to use the canonical spelling. The Timestamp class now has getIncrement()
and getTimestamp()
methods, which return 32-bit integers for each component. The Binary class now enforces a 16-byte data length for UUID subtypes 0x03
and 0x04
. All BSON type classes now implement a corresponding interface.
The ReadConcern and WriteConcern classes now have an isDefault()
method, which checks whether the object was constructed without any options. This is most useful for inspecting the objects returned by Manager::getReadConcern()
and Manager::getWriteConcern()
. The PHP library utilizes this method to decide whether a read concern or write concern should be omitted from a database command.
BulkWrite::insert()
will now always return the inserted document's ID. Previously, it only returned an ObjectId if generated by the driver. WriteResult::getUpsertedIds()
has been improved to support all BSON types. Previously, types that were neither an ObjectId nor an integer were ignored.
This release includes compatibility fixes for PHP 7.2 based on testing with PHP 7.2 RC2. Windows builds now support OpenSSL 1.1.x for PHP 7.1.2 and later. Support for PHP 5.4 has been removed.
This release upgrades our libbson and libmongoc dependencies to 1.8.0.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=17597
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 this release: