rappasoft/laravel-helpers
rappasoft/laravel-helpers offers a practical collection of helper functions and classes for Laravel, including utilities for arrays, strings, dates, numbers, URLs, and more. It helps reduce repetitive boilerplate and speed up everyday application development.
Architecture fit
rappasoft/laravel-helpers is an autoload-files utility package: it exposes global helper functions (array/string manipulation, retry(), value()) rather than classes, service providers, or facades. It fits cleanly beneath application code in any Laravel monolith or legacy app being modernized, and has no container, config, or migration surface to wire up. The tradeoff is that its real integration point is the global function namespace — an implicit, unversioned contract with the framework, other helper packages, and now the PHP runtime itself.
Integration feasibility
Low friction: composer require, one autoload entry, no publish step. The hard requirement is PHP 8.1+ with ctype and mbstring; both are commonly compiled in but are frequently omitted from minimal/Alpine container images, so base-image verification is a real checklist item rather than a formality.
Technical risk
array_first(array $array) and array_last(array $array). This package's versions accept a callback and default. The release notes confirm both behaviors are "verified" rather than unified, which means identical source code produces different results depending on the PHP minor version. A call like array_first($items, $callback) works on 8.1–8.4 and does not on 8.5. This is a silent behavioral break, not a loud fatal — the most expensive class of defect to diagnose.array_first, array_last, retry, and value also exist in laravel/framework (Illuminate/Support/helpers.php) and in the official laravel/helpers package. Two unguarded definitions of the same global function are a boot-time fatal. The notes do not state whether definitions are function_exists-guarded, so this must be verified before adoption.retry() attempt counts and delay-callback arguments, value() closure argument forwarding, and array_forget()/array_except() deletion semantics. These are labeled fixes, but any of them can change production outcomes — particularly retry(), where attempt counting affects job/HTTP retry storms, and array_forget(), where deletion semantics affect config or payload manipulation.Key questions
array_first/array_last/retry/value wrapped in function_exists() guards, and which definition wins on PHP 8.5?laravel/helpers (or any other global-helper package) co-installed? If so, which loads first?array_first/array_last with a callback or default anywhere? That is the exact 8.5 breakage set.retry() attempt count or delay-callback signature?Stack fit Laravel 9–12 on PHP 8.1–8.5, or standalone PHP with Composer. Zero framework coupling makes it safe for shared libraries that must run outside Laravel.
Migration path
Pin ^3.0.2 (do not float on ^3.0). Before any PHP 8.5 upgrade, inventory and rewrite the affected call sites to the documented replacements:
$first = array_value_first(array_where($items, $callback), $default);
$last = array_value_last(array_where($items, $callback), $default);
These are mechanical, greppable, and codemod-able — the migration is cheap if done proactively and expensive if discovered via a production incident.
Compatibility
Confirm no duplicate global definitions (framework + laravel/helpers + this package). Confirm ctype/mbstring in every runtime image. Confirm the PHPUnit patch noted in the changelog doesn't conflict with the project's own test-tooling pins.
Sequencing
retry()/value()/array_forget() behavioral deltas in isolation.array_first/array_last callback call sites to array_value_first/array_value_last + array_where.Maintenance Small, single-maintainer package with a narrow surface and low release cadence. 107 tests / 243 assertions across PHP 8.1–8.5 is reasonable hygiene but thin relative to the number of exported global functions — coverage is broad across versions, not necessarily deep per function.
Support Effectively "current PHP versions only, bug fixes, no LTS." The PHP 8.5 note is explicitly a documentation-plus-guard decision, which means the support burden for the divergence sits with consuming teams. Budget for owning that migration, not for upstream absorbing it.
Scaling
Runtime cost is negligible for one-off calls. The prescribed 8.5 replacement (array_where() then array_value_first()) allocates an intermediate array on every call — irrelevant in request paths, worth a second look in tight loops or large-collection processing.
Failure modes
array_first/array_last — quiet, environment-dependent, likely to appear only in staging/prod skew.mbstring/ctype in a container — fatal at first call, easy to miss if the base image differs from local.retry() attempt/delay semantics — can alter retry volume and backoff timing against external services; needs a targeted test before rollout.Ramp-up Very low for developers (helpers are familiar and self-documenting) but the tribal knowledge requirement is non-obvious: the PHP 8.5 signature distinction must be captured in onboarding docs and in a lint rule or static-analysis check, or it will be silently reintroduced by the next developer who reaches for the ergonomic callback form.
How can I help you explore Laravel packages today?