Composer/PSR - How to autoload functions?
How can I autoload helper functions (outside of any class)? Can I specify in composer.json some kind of bootstrap file that should be loaded first? mpen You can autoload specific files by editing your composer.json file like this: "autoload": { "files": ["src/helpers.php"] } (thanks Kint ) After some tests, I have came to the conclusions that adding a namespace to a file that contains functions, and setting up composer to autoload this file seems to not load this function across all the files that require the autoload path. To synthesize, this will autoload your function everywhere: composer