laravel/helpers
Backwards-compatibility package that restores Laravel 5.8 global helper functions for newer Laravel versions. Useful when upgrading legacy apps; helpers map to modern Arr and Str methods. Not accepting new helpers.
array_add(), str_limit(), Html::decode()). This aligns perfectly with legacy modernization use cases where core logic relies on these helpers but cannot be rewritten immediately.Arr, Str, and Html facades to proxy calls, ensuring zero breaking changes to existing code. This is critical for monolithic applications where helper usage is pervasive.composer require laravel/helpers is sufficient. No service provider registration, facade aliases, or manual overrides are required.array_add() → Arr::add()), eliminating manual code changes.illuminate/support (Laravel’s core utility package), which is already present in all Laravel installations. No additional dependencies or conflicts.array_first), reducing runtime failure risks.Arr::add() via facade) may introduce negligible latency in high-throughput systems.Html::tag()) may not cover all use cases. Teams should audit usage pre-integration.Helper::customMethod()) that rely on deprecated internals?Arr/Str methods?Deprecates trait)?illuminate/support compatibility). Works with PHP 7.4+ (Laravel 7’s minimum).grep -r "array_add\|str_limit\|Html::" app/ to identify legacy helper usage.Arr::add()).Deprecates trait to log usage of legacy helpers.| Laravel Version | Package Version | Notes |
|---|---|---|
| 7.x | 1.2.0+ | Full support |
| 8.x | 1.3.0+ | PHP 8.0+ fixes |
| 9.x | 1.5.0+ | Official support |
| 10.x | 1.6.0+ | Laravel 10 features |
| 11.x | 1.7.0+ | Laravel 11 support |
| 12.x | 1.7.2+ | Laravel 12 compatibility |
| 13.x | 1.8.3+ | Latest illuminate/support |
collect()) via the Laravel 5.8 docs.app/Helpers/Arr.php), ensure namespace collisions are resolved via composer.json aliases.illuminate/support is pinned to a compatible version (e.g., ^10.0 for Laravel 10).laravel/helpers:1.8.3 with Laravel 9).laravel/helpers to restore broken helper functionality.composer why-not laravel/helpers to debug dependency conflicts.Arr/Str facades (e.g., method removals).Log::warning("Legacy helper used: array_add()")) to track usage.laravel/helpers only when Laravel releases a new major version (e.g., 14.x).laravel/helpers:1.7.2 for Laravel 12).dd(\Arr::class, \Str::class) to confirm facades are loaded.How can I help you explore Laravel packages today?