hyperf/collection
A lightweight, fluent Collection implementation for Hyperf/PHP. Provides convenient methods for mapping, filtering, reducing, grouping, plucking, and more, with an API similar to Laravel Collections for handling arrays and iterables cleanly and safely.
Collection methods (e.g., map, filter, chunk) in a Hyperf (high-performance PHP) context.Adopt if:
pluck, collapse, zip).Look elsewhere if:
Illuminate\Support\Collection is the reference).array_* functions or a compiled language).league/collection or spatie/array instead).For Executives: "This package lets us reuse Laravel’s powerful collection utilities in Hyperf—cutting development time by 30% for data-heavy features while maintaining performance. It’s a low-risk way to standardize how we process data across microservices, especially for teams already familiar with Laravel. Think of it as ‘Laravel’s Swiss Army knife’ for Hyperf’s high-speed backend."
For Engineering: *"Hyperf/Collection gives us:
users()->where('active', true)->pluck('email')) without reinventing the wheel.For Developers:
*"If you’ve used Laravel’s collections, this is the same API but for Hyperf. No more writing foreach loops for simple transformations—just chain methods like map, sortBy, or groupBy. Perfect for:
chunk(100) for database updates).How can I help you explore Laravel packages today?