Composer autoload files for functions that cannot be classes

PSR-4 autoloading is triggered by a class name PHP cannot resolve. Functions and constants have no such hook, so a helpers file has to be loaded eagerly — which is why so many projects still have a require at the top of the bootstrap.

{
    "autoload": {
        "psr-4": { "App\": "src/" },
        "files": [ "src/helpers.php" ]
    }
}

Every file listed in files is included on every request, before anything else runs, so the list should stay short and the files should contain declarations only — no side effects, no bootstrapping. Wrapping each declaration in if (!function_exists(...)) is worth the noise: without it, two packages defining the same helper produce a fatal error rather than a resolvable conflict.