1.1.3
The PHP team is happy to announce that version 1.1.3 of our new mongodb PHP extension is now available on PECL.
Release Highlights
This release fixes a segfault when decoding corrupt BSON and improves error reporting when attempting to convert invalid BSON to a PHP variable or JSON string.
When serializing root and embedded Persistable objects, the resulting BSON document will now always include the class name identifier field (i.e. __pclass
). Previously, the driver only included the field when serializing objects for insertion or via fromPHP()
. This change makes the driver compliant with the existing Persistence specification; however, it may break existing code that returned atomic modifiers from Peristable::bsonSerialize()
to use with an update query.
There are several fixes related to handling of 64-bit integers, including but not limited to UTCDateTime's constructor accepting a numeric string on 32-bit platforms and the encoding and decoding of 64-bit integers to and from BSON.
Server selection failures now throw a ConnectionTimeoutException instead of a generic RuntimeException. This affects executeBulkWrite()
, executeCommand()
, executeQuery()
, and selectServer()
, which are the four driver methods that may result in server selection and/or connection initialization.
The WriteException message, which was previously "BulkWrite error", now includes a concatenation of all write and write concern errors.
The "readconcernlevel" option is now parsed from the Manager constructor's options array. Previously, it was only parsed from the connection URI string.
The ObjectID constructor no longer aborts when constructed with a null value. Instead, a new ObjectID will be generated, which is the same behavior as if no argument had been passed.
This release also bumps our libmongoc and libbson dependencies to 1.3.3. Notably, this update adds support for negative cursor limits (CDRIVER-1054).
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=16483
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