Composer Import Old Libs
Let's say that you need to use an old library that is no longer maintained or simply not using composer.
So, composer provides an autoloader. It handles 3 types of methods, PSR-0, classmap, and files.
In your composer.json
file, you can define a package JSON file in-line inside the repositories...
"repositories": [
{
"type": "package",
"package": {
"name": "csphere/githubwrapper",
"version": "0.0.1",
"autoload": {"classmap": ["githuboauth.class.php"]},
"source": {
"url": "git://github.com/csphere/GithubApiWrapper-PHP.git",
"type": "git",
"reference": "master"
}
}
}]
And then, the require:
"require": {
"csphere/githubwrapper": "0.0.*"
},