if your file is just a file with functions, just add it to your composer.json
},
"autoload": {
"files": [
"app/myfolder/myFunction.php"
]
},
then do a composer dump-autoload
if it is a php class, then you should be using psr-4 autoloading
"autoload": {
"psr-4": {
"MyApp\\": "app/"
},
},
read up on psr-4 autoloading if you're not familiar http://www.php-fig.org/psr/psr-4/