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

Result::toArray() should proxy iterator_to_array($this)

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

      This was previously discussed in PHPC-157 when consolidating the command and query result classes. Accessing the singular result document of a command should require the user to do $result->toArray()[0].

      Currently, this method converts firstBatch from BSON to a zval (ignoring any custom type map in the process), which leads to inconsistent behavior between results for queries, commands that return a cursor, and commands that do not return a cursor.

            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: