- How do I install illuminated/helper-functions in a Laravel app?
- Run composer require illuminated/helper-functions and you are done. The package autoloads its function files through Composer's files directive, so there is no service provider to register, no config to publish, and no facade to alias. Functions become globally available on the next request.
- Do I need to register a service provider for illuminated/helper-functions?
- No. It is a procedural utility library, not an architectural component, so it ships no service provider, bindings, configuration, or facade. Composer's autoload files entry is the entire registration mechanism. That also means nothing appears in your container or config cache.
- Which Laravel and PHP versions does illuminated/helper-functions support?
- The package targets the Laravel 6+ and PHP 7.x/8.x era. Because there is no formal compatibility matrix published, always check the require constraints in the package composer.json before pinning it. Confirm the PHP constraint matches your runtime and whether any helpers depend on Laravel internals.
- What kind of helper functions does illuminated/helper-functions provide?
- It is a mixed collection of Laravel-specific and pure PHP helpers covering common string and array manipulation tasks. Some functions work standalone in plain PHP, while others may lean on Laravel's Str and Arr classes. Inventory the exact functions you need against real call sites before adopting it.
- Will illuminated/helper-functions collide with my existing app/helpers.php or Laravel's Str and Arr?
- Global namespace collisions are the most likely failure mode, and a redeclaration fatal depends on autoload order. Composer loads files in dependency order, so vendor files typically load before app-level helper files, but verify that empirically. Run a name-collision audit by grepping each function name across your codebase and installed packages before installing.
- Does illuminated/helper-functions duplicate helpers already built into Laravel?
- Laravel has absorbed many of these helpers over time through functions like str_contains and methods on Str::of and Arr::, so the package's marginal value shrinks with each framework release. Diff every function you plan to use against native PHP 8+ and Laravel equivalents and drop any with a first-party match. Adopt only the helpers that genuinely fill a gap in your codebase.
- Can I use illuminated/helper-functions in a non-Laravel PHP project?
- Only partially. The pure PHP subset works in any Composer project, but any helper that relies on Laravel's Str, Arr, or container internals will fail outside a Laravel application. Check each function's implementation before assuming portability.
- How do I test global helper functions from illuminated/helper-functions?
- Because they are plain global functions rather than injectable services, you call them directly in your test suite; there is nothing to mock or bind in the container. Add a boot smoke test that asserts the functions exist and behave as expected after Composer autoload runs. That smoke test also catches redeclaration errors introduced by future dependency upgrades.
- Is illuminated/helper-functions safe to use in production?
- Code risk is low, but lifecycle risk is moderate to high: it is a single-maintainer package with a small install base and no architectural footprint. The MIT license is your mitigation, since you can vendor or fork the code if maintenance stalls. Pin an exact version, document the functions you consume, and add a dependency-review gate to catch future name collisions.
- What are the alternatives to illuminated/helper-functions, or how do I remove it later?
- The cleanest alternative is extracting only the functions you use into an application-level helpers file or, better, small static support classes, preserving the MIT attribution. The fallback is to keep it as a pinned exact-version dependency with a documented function inventory. Either path eliminates the collision surface and single-maintainer risk, and Laravel's built-in Str and Arr methods cover many of the same cases.