Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-344

Allow non-root Serializable to encode as BSON array

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.0-alpha1
    • Affects Version/s: 0.6.3
    • Component/s: None
    • Labels:
      None

      Per the serialization spec:

      • Root documents must be serialized as a BSON document.
      • MongoDB\BSON\Persistable objects must be serialized as a BSON document.
      • If bsonSerialize returns a packed array, serialize as a BSON array.
      • If bsonSerialize returns a non-packed array or stdClass, serialize as a BSON document.
      • If bsonSerialize did not return an array or stdClass, throw an MongoDB\Driver\Exception\UnexpectedValueException exception.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: