I\'m trying to add an external library to symfony. I\'ve tried this on the app/autoload.php:
$loader->add(\'LibCokeId\',__DIR__ . \'/../vendor/libcokeid/l
In the situation where you have a library that doesn't use composer and you can't retrieve it from packagist, you can manipulate the Composer autoload.
Simply add the class in the composer.json
files, as example:
"autoload": {
"psr-0": { "": "src/" },
"files": [
"vendor/folder/my_custom_lib/myFiles.php",
"vendor/libcokeid/libcokeid/lib/libCokeId/LibCokeId.php"
]
},
OR you can Autoload the whole folder in composer.json
:
"autoload": {
"psr-0": { "": "src/" },
"classmap": [
"vendor/libcokeid/libcokeid/lib"
],
},
Remember to make a composer install after setting this.
Hope this help.