MongoDB HHVM Driver 1.2.0alpha1 released
Pre-releaseThe PHP team is happy to announce that version 1.2.0alpha1, of our new "mongodb" HHVM extension is now available.
You can download the driver from the "hhvm-mongodb-1.2.0alpha1.tgz" attachment to this release announcement.
Release Highlights
This is the first preview release for 1.2.0, and supports all the features of the upcoming MongoDB 3.4 server release.
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-rc0. The final 1.2.0 release will depend on libson and libmongoc 1.5.0.
Internal changes aside, we did manage to sneak a few new features into this release. BSON classes now support PHP serialization and var_export(). JSON serialization is still not implemented, but we plan to have that ready for 1.2.0. 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 and defaults to an empty string.
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: SERVER-1920 for additional information). MongoDB\Driver\ReadPreference
now supports a "maxStalenessMS" integer option, which can be used with modes other than "primary" to specify an acceptable replication delay for secondary
servers (see: SERVER-12861). The "maxStalenessMS" 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=17560
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