Doctrine toIterable batch loop: chunk size and clear cadence unresolved
Doctrine ORM's Query::toIterable() is the documented starting point for memory-bounded reads over large result sets, but it does not by itself cap memory: hydrated entities remain in the UnitOfWork identity map until EntityManager::clear() detaches them, and pending changes must be flushed before detachment. The open decision is the chunk size and clear cade