Skip to content

Add info about Collection sugar methods #348

@marcj

Description

@marcj

Since PHP has a memory leak in our Collection classes we've removed the possibility to call our sugar methods (isLast, isOdd, etc) on a collection directly. It's necessary now to call those methods on the iterator instead.

$books = BookQuery::create()->find();
$iterator = $books->getIterator();
foreach ($iterator as $book){
    if ($iterator->isLast()) {
        //...
    }
}

We have anyhow very less information about that feature documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions