Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

MongoDB HHVM Driver 1.2.0 released

Compare
Choose a tag to compare
@derickr derickr released this 29 Nov 10:39
· 127 commits to master since this release

The PHP team is happy to announce that version 1.2.0 of our new "mongodb" HHVM
extension is now available.

You can download the driver from the attachment to this release announcement.

Release Highlights

This is the first release that supports all features of the MongoDB 3.4 server
release, such as Collation support, the Decimal128 BSON type, and the MongoDB
handshake protocol for easier debugging.

It contains a significant amount of internal refactoring to remove our
dependence on libmongoc's private API. This release also upgrades our libbson
and libmongoc dependencies to 1.5.0.

Internal changes aside, we did manage to sneak a few new features into this
release. BSON classes now support PHP serialization, JSON serialization via
json_encode() and PHP's JsonSerializable interface, and var_export().

The UTCDateTime constructor now defaults to the current time if no
argument is provided and can also accept a DateTimeInterface instance.

The Binary and Javascript types now have __toString() methods that return their
binary data and code strings, respectively. The JavaScript class also has new
getCode() and getScope() methods, which were curiously absent in previous
versions.

A MongoDB\BSON\ObjectID::getTimestamp() helper method has been introduced,
which returns the 4-byte timestamp component of an ObjectID as an integer. The
second $flags parameter to the MongoDB\BSON\Regex constructor is now optional,
defaults to an empty string, and sorts the flags alphabetically when
constructed.

MongoDB\Driver\Query, MongoDB\Driver\BulkWrite::update(), and
MongoDB\Driver\BulkWrite::delete() now accept a "collation" document option,
which can be used to specify a locale-aware string comparison or sort order
(see: Collation in the MongoDB manual for additional information).

MongoDB\Driver\ReadPreference now supports a "maxStalenessSeconds" integer
option, which can be used with modes other than "primary" to specify an
acceptable replication delay for secondary servers (see: SERVER-12861). The
"maxStalenessSeconds" option may also be used in the connection URI or options
array provided to MongoDB\Driver\Manager to configure the default read
preference.

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

Documentation

Documentation is available on PHP.net:
http://php.net/set.mongodb

Feedback

Feedback can be provided through our JIRA issue tracker at
http://jira.mongodb.org/browse/HHVM