hoa/iterator
Hoa\Iterator is a PHP library offering a comprehensive collection of iterator classes and helpers, including filters, maps, limits, aggregates, and recursive traversals, for composing elegant, reusable iteration logic over arrays and other traversable data.
hoa/iterator bundles iterator primitives — map, filter, limit, lookahead, buffer, counter, infinite sequences — that PHP's SPL and generators (yield) already provide, and that Laravel wraps as LazyCollection. This assessment supports a "use-native" verdict, not an adoption.composer.lock contains hoa/* packages, this is the reference for deciding whether to keep, fork, or excise them — usually excise, because the cost is small and the maintenance exposure isn't.LazyCollection, generators, or SPL — and explicitly not a third-party iterator library.Consider it only under narrow, legacy-bound conditions:
hoa/iterator directly or transitively (typically via hoa/consistency), and the immediate goal is "don't break it this sprint." Freeze the version, don't extend it.Hoa\Iterator classes, and rewriting those call sites is out of scope for the current increment.Look elsewhere — specifically at LazyCollection / generators / SPL — when any of the following is true:
LazyCollection covers map, filter, chunk, take, and zip lazily with zero added dependencies and full framework support.To executives — one line: this is a small, abandoned utility library that duplicates capabilities PHP and Laravel already ship; the recommendation is to remove it from the dependency tree rather than adopt it, and the cost to do so is low.
The value case is negative, not positive. It delivers no capability we can't get natively, so it adds no differentiated product value while adding a permanent maintenance obligation on a component nobody maintains. Every quarter it stays is a quarter we owe an unplanned upgrade task. Framing it as a deprecation item with a small, bounded cost is more honest and more actionable than treating it as a technology choice.
To engineering — the practical pitch: don't adopt, plan the exit. Map Hoa\Iterator\Map / Filter / Limit to LazyCollection or generator functions; those translations are largely mechanical. Budget a short spike (hours, not a project) to confirm the transitive dependency path, verify behavior parity on the specific call sites in use, and land the replacement behind existing tests. Where there are no tests, that's the real risk — not the library swap.
To product/design — what changes for them: nothing user-visible. This is a risk-reduction and velocity item that protects future upgrade work; it should be scheduled as engineering hygiene, not traded against feature scope.
The honest caveat to state up front: if a spike shows the package is deeply entangled in legacy code paths with no coverage, this becomes a larger migration and should be scoped and sequenced explicitly — but the direction of the decision does not change. Archived and zero-dependents means there is no version of this where continued reliance is the right long-term answer.
How can I help you explore Laravel packages today?