minwork/array
Minwork Array provides fast, well-tested helpers for nested, associative, and object arrays. Get/set/has plus map, filter, find, group, sort, and validation, with fluent-style chaining. No dependencies; modern PHP syntax.
Feature Development:
map, filter, group, and sort.Arr::set(), Arr::get(), and Arr::has() for nested access.Arr::sortObjects(), grouping with Arr::groupObjects()).Arr::has() or ensuring data integrity with Arr::check()).Roadmap Prioritization:
Arr::sum() or Arr::flatten() in high-throughput systems (e.g., batch processing).Use Cases:
Arr::orderByKeys() for configurable column sorting).Arr::sum()) or group data (e.g., Arr::groupObjects()) for analytics.Arr::set() for default values, Arr::diffObjects() for change detection).Arr::mapObjects() for event handlers).Adopt When:
Arr::obj()->set()->remove()->getArray()) to reduce temporary variable clutter.group, sort, or flatten operations).Look Elsewhere When:
Illuminate\Support\Arr (this package is a standalone alternative with some overlapping but extended functionality).Arr::flatten() may not be optimal; consider generators or chunking).*"This package lets our team build data-processing features faster by replacing custom array-handling code with a battle-tested, MIT-licensed library. For example:
Arr::set('user.profile.name', $value) instead of manual recursion).*"minwork/array gives us a Laravel-like Arr helper but standalone, with superpowers:
Arr::obj($data)->filter()->map()->getArray()).get/set/has for deeply nested structures (e.g., config, JSON APIs) without isset() spaghetti.Arr::sortObjects($users, 'getAge')).array_map/array_filter with more expressive, debuggable code.
Downside: Last updated in 2020, but the MIT license and tests make it low-risk. We can fork if needed."Key Selling Point: "It’s like having a Swiss Army knife for arrays—but without the risk of Laravel’s Arr if we’re not using Laravel."
How can I help you explore Laravel packages today?