Skip to content

Infinite Loop Detection triggered by multiple collect calls #464

@Floppy012

Description

@Floppy012

Current Behavior

When handling a paginated request using Laravel's LazyCollection, multiple calls to ->collect() will trigger the infinite loop detection.

Expected Behavior

Multiple calls to ->collect() should not trigger the infinite loop detection. The infinite loop detection should reset with each collect call.

Reproduction

$connector = new ExampleConnector();

$request = new ExamplePaginatedRequest();

$lazyCollection = $connector->paginate($request)->collect();

$lazyCollection->collect();
$lazyCollection->collect();
$lazyCollection->collect();
$lazyCollection->collect();
$lazyCollection->collect(); 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions