MongoDB PHP Driver 1.2.0alpha2 released

13 views
Skip to first unread message

Jeremy Mikola

unread,
Sep 14, 2016, 4:11:58 PM9/14/16
to mongodb-...@googlegroups.com, mongod...@googlegroups.com
The PHP team is happy to announce that version 1.2.0alpha2 of our new mongodb PHP extension is now available on PECL.

Release Highlights

This is the second preview release for 1.2.0. This release includes two significant changes related to how the driver communicates with a server and persists connections across requests (within a PHP worker process). Integration with PHP's streams API has been removed and the driver now relies on libmongoc for all socket communication, which should resolve some issues with connection and socket timeouts not being correctly applied. While previous versions of the driver persisted individual sockets across requests (based on host, port, and URI string), the driver now persists the entire libmongoc client object and its sockets (based on MongoDB\Driver\Manager constructor arguments). This means that SSL sessions and topology states will now be preserved across requests (i.e. the driver will not issue a flurry of isMaster commands to re-discover the topology on each request).

This release changes the PHP serialization format (i.e. serialize()) of our BSON type classes, which was necessary for compatibility with our HHVM driver. The BSON type classes previously used O-type serialization and implemented a __wakeup() method. They now use C-type serialization, implement PHP's Serializable interface, and no longer provide a wakeup() method. This change means that the driver will not be able to unserialize() strings created by previous 1.2.0-alpha1 release, which introduced PHP serialization support.

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.

Lastly, this release also upgrades our libbson and libmongoc dependencies to 1.5.0-dev. The final 1.2.0 release is expected to depend on libson and libmongoc 1.5.0.

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

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-alpha
 
or update with:
 
    pecl upgrade mongodb-alpha

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

Reply all
Reply to author
Forward
0 new messages