somnambulist/collection
A PHP/Laravel collection package that extends the standard Collection with type-safe wrappers, extra helper methods, and immutable-style operations for cleaner, more predictable data manipulation.
map/filter/reduce, typed collections, or immutable data structures, this package is a candidate to "buy" (adopt) rather than build from scratch — cutting a small but real chunk of boilerplate from roadmap delivery.illuminate/support or any framework runtime. Useful when deciding whether a feature belongs in a standalone package versus the monolith.Consider it when:
Look elsewhere when:
Illuminate\Support\Collection; adopting a second collection type adds cognitive and interoperability overhead for no gain.To executives (one paragraph): This is a small, MIT-licensed, dependency-free collections library that lets us add common data-manipulation features without pulling in a framework or writing them ourselves. The upside is speed and a clean dependency footprint; the caveat is that it is a low-adoption project (11 stars, 0 dependents) with effectively a single maintainer, so we should treat it as code we adopt and own (vendor/fork), not a vendor we depend on. The cost is negligible, the reversibility is high, and the risk is contained to internal or standalone components. Recommendation: pilot it in one non-critical package, with a standing rule that any Laravel-side feature uses the framework's native collections.
To engineering (summary): Zero dependencies, MIT, small enough to read in an afternoon and vendor into the repo. We'd use it where we want collection ergonomics outside Laravel — SDKs, CLI tools, extracted packages — and we'd pin or fork it rather than rely on upstream responsiveness. Inside Laravel, use Illuminate\Support\Collection; mixing collection types across a codebase is a maintenance tax we don't want to pay. The ask is a time-boxed trial on one package with a documented fork path if the maintainer goes quiet.
How can I help you explore Laravel packages today?