saloon icon indicating copy to clipboard operation
saloon copied to clipboard

Infinite Loop Detection triggered by multiple collect calls

Open Floppy012 opened this issue 1 year ago • 0 comments

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(); 

Floppy012 avatar Nov 08 '24 18:11 Floppy012