Description

This is the most commonly used binary subtype and should be the 'default' for drivers and tools.

Type \x02, the PHP driver's current default, is deprecated:

This used to be the default subtype, but was deprecated in favor of \x00. Drivers and tools should be sure to handle \x02 appropriately. The structure of the binary data (the byte* array in the binary non-terminal) must be an int32 followed by a (byte*). The int32 is the number of bytes in the repetition.

This removes using deprecated type 2 as the default, and also does away with the deprecation notice when the constructor's type argument was not specified (introduced by d9ed9c49f176e0c30eacaed002c8b1997464b9dc in 1.2.11).

Githook User
added a comment - Mar 04 2014 10:10:38 PM +00:00 Author:
{u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}
Message: PHP-407 : Default MongoBinData to type 0 and remove E_DEPRECATED notice
This removes using deprecated type 2 as the default, and also does away with the deprecation notice when the constructor's type argument was not specified (introduced by d9ed9c49f176e0c30eacaed002c8b1997464b9dc in 1.2.11).
The bug00407.phpt test is made redundant by changes to mongobindata-001.phpt and has been removed.
Branch: master
https://github.com/mongodb/mongo-php-driver/commit/242f004388f36a26a7f4ea515bd877d8bba159f0