-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
The iterators for DatabaseInfo, CollectionInfo, and IndexInfo can be removed. Instead, create a CachingIterator that decorates a CallbackIterator:
// First class callable syntax, needs new factory in info classes return new CachingIterator(new CallbackIterator($cursor, IndexInfo::fromDatabaseResult(...))); // Alternatively, create a static closure to instantiate the info object return new CachingIterator(new CallbackIterator($cursor, static fn (array $info) => new IndexInfo($info)));
- depends on
-
PHPLIB-1522 Deprecate iterators for database, collection, and index enumeration
- Closed