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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 0.4.0
    • Affects Version/s: 0.2.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
              Jeremy Mikola
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: