michael-rubel/laravel-loop-functions
Laravel Loop Functions provides handy helper functions for writing cleaner loops in Laravel, offering concise, readable alternatives to native PHP iteration when processing arrays and collections. A lightweight package that keeps repeated loop logic simple and expressive.
Change since last assessment (3.4.3). The only delta is a single commit adding Laravel 10 support and a patch-level version bump. There are no breaking changes, no new functions, no deprecations, and no security content. The practical effect is that the supported illuminate/support ceiling moves from Laravel 9 to Laravel 10 — still one to two majors behind a current Laravel 11/12 runtime. This is a factual correction to the prior assessment (which hedged that the constraint "almost certainly excludes our current runtime" and described the release line as "Laravel 9/10 era"), not a change in kind. The recommendation is unchanged, but the risk ranking and the rationale shift slightly.
Architecture fit. laravel-loop-functions remains a convenience-layer micro-package: global helper functions wrapping iteration over arrays and collections. It occupies the outermost "sugar" tier, with no persistence, transport, lifecycle hooks, or container bindings of consequence. It cannot damage our architecture and equally cannot provide architectural leverage. The entire value proposition is ergonomic — fewer keystrokes than collect($data)->map(...). Because the alternative is always "write the five lines yourself," DX dependencies must clear a higher maintenance bar than capability dependencies, and 3.4.3 does not move that bar.
Integration feasibility. Mechanically trivial and unchanged: MIT-licensed, Composer-installable, no native extensions or external services, auditable in an afternoon. The 3.4.3 release nominally improves installability on Laravel 10, which converts a likely hard blocker into a soft one for teams still on 10. Two governance facts still dominate. First, the repository is reported as archived — a new tag on an archived repo is an anomaly worth verifying directly on Packagist and in the git history before we rely on it; if the archive flag was lifted, that is a meaningful signal and should be re-evaluated on its own merits. Second, adoption remains 17 stars and zero dependents, so no third party has validated this package through a production Laravel upgrade cycle. Adding Laravel 10 support is not validation; it is the maintainer keeping the constraint matrix tidy.
Technical risk. Ranked, with the 3.4.3 impact noted:
function_exists variant fails silently if another helper package or our app/Support/helpers.php declares the name first — a nondeterministic, environment-dependent behavior change that is expensive to diagnose.illuminate/support constraint now demonstrably admits Laravel 10, which removes the immediate forced fork for a Laravel 10 shop. Against our 11/12 target it still excludes the runtime, so a fork or --ignore-platform-reqs remains the path.Key questions to resolve before any decision.
Collection / array_map / generators do not?php and illuminate/* constraints satisfied by our current runtime after 3.4.3?Stack fit. Unchanged. On Laravel 11/12 and PHP 8.3/8.4, the package now supports up to Laravel 10 — a clean composer require remains unlikely and a constraint mismatch should still be the expected first outcome.
Recommended migration path: vendor, don't depend. MIT licensing, a tiny surface, and a dead upstream continue to make lifting the useful helpers into first-party code the correct move:
app/Support/loop.php under the files autoload key, or into a Support\Loop class if we prefer static methods over globals.michael-rubel/laravel-loop-functions through 3.4.3 (Laravel 10 ceiling), declined as a dependency, vendored N helpers; rationale: archived upstream, zero dependents, no supported path to Laravel 11+."Estimated effort remains half a day including tests and the ADR — cheaper than one debugging session caused by a silent namespace collision.
Compatibility. If a team insists on installing it, 3.4.3 makes that viable on Laravel 10: pin the exact version (not a caret range), add a CI job running our full PHP × Laravel matrix against the pin, configure SCA tooling to accept the "abandoned package" finding with a documented expiry, and wrap every call site behind a first-party facade so removal is a one-file change.
Sequencing.
Maintenance. Upstream maintenance is effectively zero; 3.4.3 is a single compatibility commit, not the start of a release cadence. On adoption, 100% of the maintenance burden transfers to us without any of the benefits of ownership — no API influence, no upstream test suite, no release process. Vendoring at least makes that trade explicit; depending on it makes the burden invisible until it is urgent.
Support. No upstream support channel, no security advisory feed, no maintainer escalation path. The package will surface in every security review and SCA scan as an abandoned dependency for the life of the product. Small per occurrence, large in aggregate — background noise that erodes a clean dependency posture. The 3.4.3 release does not create a support relationship and should not be read as one.
Scaling. Runtime scaling remains a non-issue: in-memory iteration helpers with negligible overhead. The real concern is team scaling. Introducing a nonstandard iteration dialect when Collection, LazyCollection, and native array functions are universally understood is negative knowledge transfer. Every new engineer pays a small tax and every review gains a "why not just use collect()?" conversation. At 17 stars this is not a convention we are aligning with; it is one we would be inventing.
Failure modes.
function_exists guard means first-loaded wins; behavior diverges by autoload order across environments.LazyCollection when they are eager, producing memory surprises on large datasets — hard to attribute back to a "convenience" package.Ramp-up. Technically trivial — hours, not days, whether installing or vendoring, and slightly easier than before for Laravel 10 shops. The real ramp-up risk is cultural: the package teaches a house dialect for a problem Laravel has already solved idiomatically. The opportunity score of 4.65 reflects genuine ergonomic appeal; it does not offset archived status, zero dependents, negligible adoption, and a Laravel 10 terminal ceiling. Recommendation: unchanged — decline as a dependency; harvest the one or two helpers that beat native Collections into a first-party support file with attribution and tests, and document the rejection, noting 3.4.3 as the evaluated terminal release.
How can I help you explore Laravel packages today?