fg/parkour
A lightweight Laravel package for chaining steps into clean, readable flows. Parkour keeps multi-stage actions and pipelines simple to write, easy to follow, and effortless to extend, with minimal setup and familiar Laravel conventions.
get/set/has/remove, flatten, recursive merge, grouping/plucking, and key remapping. The useful decision it informs is not "adopt this library" but "do we vendor 60 lines or pull a dependency?" For most teams the answer is vendor: these are the cheapest functions in the codebase to own and the most expensive to inherit risk on.$a['x']['y']['z'] ?? null chains, that's a real readability win.Arr helper — nothing more.Consider it only when all of the following hold:
NOASSERTION license. This is the hard gate. An undeclared license means you cannot confidently redistribute it, ship it in a commercial artifact, or represent it in an SBOM. If legal cannot clear it in a day, stop.Look elsewhere — or write it yourself — when:
array_column on objects, first-class callable syntax, spread with string keys, array_is_list, and match have absorbed most of what this library existed to paper over. A 30-line Arr class with get/set/has covers the remainder with full static analysis.mixed.illuminate/support's Arr (if Laravel is already present), symfony/property-access, or nikic/php-parser-adjacent tooling all carry active maintainers. In a Laravel codebase specifically, Arr::get, Arr::set, Arr::pluck, and data_get() are already in the framework you pay for.The honest default: do not adopt. Read it, borrow the API shape, write 40 lines, own it forever.
To executives: We evaluated a small open-source PHP utility library for array handling. It solves a real but narrow problem — clean access to nested data — and it does so with a pleasant, readable API. However, it was last released in 2015, has no downstream users, no security process, and an unclear license that our legal team cannot sign off on without investigation. My recommendation is not to adopt it as a dependency. Instead, we should take the API pattern as inspiration and implement a small internal helper — roughly a day of engineering — that we fully control, can type-check, and will never create a license or audit surprise. Cost of building: negligible. Cost of an unmaintained, unlicensed dependency surfacing during diligence or an incident: not negligible. Net: we get the ergonomic benefit with none of the tail risk.
To engineering: This is fg/parkour — path-based array access plus flatten/merge/group helpers, circa PHP 5.3. Good news: the ideas are sound and the surface area is tiny. Bad news: no type hints, no CI, no releases since 2015, NOASSERTION license, zero dependents. We are not taking it as a Composer dependency. Action: implement an App\Support\Arr with get, set, has, forget, and groupBy, using dot-path semantics and mixed returns behind a strict return-type wrapper so PHPStan stays green. If you're in a Laravel module, just use data_get() and Arr:: from illuminate/support — it's already installed and maintained. If anyone believes there's a function in Parkour we genuinely can't replace in under 50 lines, bring it to me and we'll look at that one function specifically.
How can I help you explore Laravel packages today?