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

Iterator implementation for MongoDB\Driver\Cursor

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.9.0-rc1, 1.9.0
    • Affects Version/s: None
    • Component/s: None
    • None

      MongoDB\Driver\Cursor has historically only implemented Traversable and provided an internal iterator (not to be to the Iterator userland class). PHP 8 required that we implement either Iterator or IteratorAggregate directly (PHPC-1690), although PHP also provides an internal iterator for extensions to make that easier.

      That said, we should consider providing a proper Iterator implementation on the Cursor to remove our reliance on the internal iterator class for PHP 8 and present a consistent API for all supported versions.

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: