-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 0.6.3
-
Component/s: None
-
None
The serialization spec originally talked about excluding the __pclass property when decoding BSON to PHP. We previously spoke about including it to data passed to bsonUnserialize() but not array/stdClass values; however, I think we should simply always include it when decoding to PHP.
This is easier to document for users and also guarantees that we the driver doesn't lose any fields when converting between BSON and PHP (similarly, __pclass would always be included for JSON conversions). This supports the idea of always being able to round-trip data without any loss.