saloon
saloon copied to clipboard
Infinite Loop Detection triggered by multiple collect calls
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();