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
The Lost Functions

The Lost Functions Laravel Package

jawira/the-lost-functions

Jawira's The Lost Functions is a lightweight PHP utility library that fills gaps in the standard library with simple, dependency-free helpers for common array, string, and value operations. Drop-in functions for cleaner, more expressive PHP code, with namespaced, reusable helpers designed for modern...

View on GitHub
Deep Wiki
Context7

Collection of convenience functions.

Frequently asked questions about The Lost Functions
Is jawira/the-lost-functions a Laravel package?
No. It is a framework-agnostic Composer library of standalone PHP convenience functions for array, string, and general value operations. There is no service provider, facade, config file, publishable assets, or package-discovery metadata, so Laravel never registers it. It simply sits beneath your domain layer as a plain helper namespace and can be used in any modern PHP project.
How do I install jawira/the-lost-functions in a Laravel app?
Install it with composer require jawira/the-lost-functions and let Composer regenerate the autoloader. The functions are loaded through Composer's files autoload directive, so they become available as soon as the autoloader is required. There is no artisan install, no registration step, and nothing to publish.
Do I need to register a service provider or publish a config file?
No, and none exists. The package ships no service provider, facade, config, migration, or assets, and it declares no Laravel package discovery metadata. That is why installation is a single Composer command and uninstalling is equally clean. The trade-off is that there is no central registration point documenting where these functions came from, so add a note in your project docs.
Which PHP and Laravel versions does it support?
Because the package never touches framework internals, it can in principle work with any Laravel version from 5.x through 11.x. The real constraint is the PHP version matrix, so check the php requirement in the package's composer.json and its CI matrix before adopting it. Note that a low release cadence means it may not be patched for future PHP deprecations, so pin the version you validate.
Will it collide with Laravel's global helpers or Illuminate helpers?
The helpers are namespaced, which greatly reduces collision risk compared with true global functions, but you should still confirm the namespace and function names before adding it. Functions autoloaded via the files directive produce a Cannot redeclare fatal error at boot if a name clashes, which takes down the whole application rather than one code path. Reviewing the function list against your codebase and Laravel's helpers is a five-minute check worth doing.
Does jawira/the-lost-functions work with PHPStan, IDEs, and opcache.preload?
Files-autoloaded functions are historically awkward for static analysers and IDEs, and that only improves if the package ships stub files or accurate docblocks. Check how your PHPStan or Psalm setup resolves the functions, and avoid relying on autocomplete in editors that index classes rather than functions. If you use opcache.preload, verify the functions are preloaded correctly in a staging build before production.
Is it safe to use in production given the low download and dependent count?
The main risk is governance, not code quality: it is a single-maintainer, hobby-scale project with essentially no dependent ecosystem and therefore little external pressure to keep it healthy. That means fewer eyes for bug discovery and no guarantee of timely patches for PHP deprecations. If you adopt it, pin the exact version, vendor it in your lockfile, and consider forking it under your own organisation so you control the upgrade path.
Can I use jawira/the-lost-functions outside of Laravel?
Yes. The library is framework-agnostic and only requires Composer and a supported PHP version, so it works in Symfony, Slim, WordPress, or plain PHP scripts. Because the functions are autoloaded through the files directive, they are available immediately after the Composer autoloader is loaded. That portability is also why it has no Laravel-specific integration to configure.
Is it worth adding when Laravel already provides Str, Arr, and global helpers?
Only if it covers gaps those do not. Laravel's Illuminate\Support\Str, Illuminate\Support\Arr, and the global helpers already handle most common array and string operations, so adding this introduces a second idiom and an extra dependency namespace. Before adopting it, list the specific functions you need that Str, Arr, or your own App\Support classes do not provide; if that list is shorter than about five functions, write them yourself instead.
How do I test code that uses these functions?
Because the helpers are plain functions loaded by Composer, they are available in PHPUnit or Pest tests as soon as the test bootstrap loads the autoloader, so no mocking or container binding is required. Test behaviour through the code that calls them rather than asserting on the helpers themselves. If you want isolation from future breaking changes, wrap the calls you depend on in your own small App\Support class and test against that wrapper.
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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core