Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Helpers Laravel Package

laravel/helpers

Backwards compatibility layer restoring Laravel 5.8's global helper functions—array, string, and URL helpers—in newer Laravel releases. Install with Composer; new helpers are not accepted. Modern equivalents are available as static methods on the Arr and Str classes for older codebases.

View on GitHub
Deep Wiki
Context7

Laravel Helpers is a backwards compatibility package that restores the global helper functions removed from Laravel after version 5.8. It lets existing applications keep using familiar array_* and str_* helpers without refactoring, while running on the latest Laravel release.

The package simply maps each legacy helper to its equivalent method on the Arr and Str classes, so behaviour stays consistent with the framework. Note that it is maintenance-only: no new helpers are accepted.

  • Restores Laravel 5.8 global helpers on modern Laravel
  • Forwards calls to the Arr and Str classes
  • Drop-in install via composer require laravel/helpers
  • Zero configuration required
  • MIT licensed and maintained by Laravel
Frequently asked questions about Helpers
What is laravel/helpers and why would I need it?
laravel/helpers is a backwards compatibility layer that restores Laravel 5.8-era global string and array helper functions in newer Laravel releases. You would need it when upgrading Laravel and legacy code still calls helpers such as array_first, array_last, str_contains, or array_prepend. It delegates those calls to the modern Arr and Str APIs so legacy call sites keep working while you plan refactoring.
How do I install laravel/helpers in a Laravel project?
Install it with Composer by running composer require laravel/helpers. The README describes no application configuration, service provider registration, or runtime wiring after installation. You should still verify Composer constraint compatibility with your target Laravel and PHP versions before promoting it beyond staging.
Which Laravel versions does laravel/helpers support?
The package tracks Laravel releases and is intended for newer Laravel versions that no longer include the Laravel 5.8 helpers by default. Its release history shows ongoing compatibility updates, including a v1.8.3 release with an illuminate/support ^13.0 constraint. Check Packagist and the composer.json constraints for the exact Laravel and PHP versions supported by the release you plan to use.
Does laravel/helpers require configuration or a service provider?
No application configuration or service provider registration is described in the README. Installation is a single Composer requirement, which makes it relatively easy to pilot in staging. That does not remove the need to test legacy helper behavior and check for global function name collisions.
Which Laravel 5.8 helpers are restored by laravel/helpers?
It restores the global string and array helper functions from Laravel 5.8 by delegating to the modern Arr and Str classes. Examples mentioned in its maintenance history include array_first, array_last, array_prepend, and str_contains. Inventory your legacy helper calls and compare them against the package source because it does not cover unrelated deprecated Laravel APIs and is not accepting new helpers.
Is laravel/helpers still maintained and does it accept new helpers?
The package has active compatibility fixes, including corrections for helper edge cases and PHP nullable-parameter compatibility. However, the README explicitly states that new helpers are not being accepted. Treat it as a maintained compatibility bridge with a fixed scope, not as an extensible helper library.
Can laravel/helpers conflict with other global helper functions?
Yes, because it defines global functions, it can collide with other legacy shims or vendor packages that declare the same helper names. Before adoption, run a collision audit across your Composer dependencies and application code. Global functions are also harder to trace, mock, and statically analyze than class methods, so document ownership clearly.
How should I test laravel/helpers after a Laravel upgrade?
Test representative legacy call sites against the modern Arr and Str equivalents, focusing on argument handling, null behavior, and edge cases. Cover business-critical user journeys that still depend on deprecated helpers, not just a few smoke tests. This matters because prior releases fixed issues such as infinite-loop behavior in array_first, array_last, and str_contains, showing that helper semantics should be verified rather than assumed.
Is laravel/helpers safe to use in production?
It is MIT licensed and can be safe as a temporary upgrade enabler, but it carries behavioral drift risk because legacy helpers may not exactly match modern Arr and Str behavior in every edge case. It can also hide technical debt by letting deprecated calls succeed silently. Use it with regression tests, production monitoring, and a documented rollback plan if a helper mismatch appears.
When should I remove laravel/helpers and use Arr and Str instead?
Remove it when legacy helper call sites have been refactored to the modern Arr and Str APIs, or when the codebase has no remaining Laravel 5.8 helper dependency. Define an owner, remediation backlog, and dated exit criterion before approving adoption. The package is a bridge with a known end state, not a long-term platform capability.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections