Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-91

Ensure query/filter args always serialize as BSON documents

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.2.0
    • Affects Version/s: 0.2.0
    • Component/s: None
    • None

      CRUD methods that take filter arrays should ensure that they are cast to objects to guarantee serialization to a BSON document. Server 3.0+ is more strict about types, and BSON arrays may no longer be allowed where objects are expected.

      Note that this is inconsistent for some commands (e.g. count was relaxed in SERVER-15456), but we should be consistent throughout.

      For methods where filters are truly optional, we should simply omit the value rather than casting an empty array.

            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: