{ "vendor/package": "version" }
// eg. { "carbon/carbon": "1.8.*" }
{ "mockery/mockery": "dev-master" }
{
"pre-update-cmd": [ "git pull" ],
"post-update-cmd": [ "grunt", "grunt clear-cache" ]
}
"post-update-cmd": [ "grunt", "Namespace\\Class::migrate" ]
"repositories": [
{
"type": "git",
"url": "git@bitbucket.org:architectagency/utilities.git"
}
]
require __DIR__ . 'vendor/autoload.php'
"autoload": {
"files": [
"some/functions.php", "morefunctions.php"
]
}
"autoload": {
"classmap": [
"src/controllers", "src/utilities", "src/phpclass.php"
]
}
"autoload": {
"psr-0": {
"Project\\": "src/"
}
}
src /
IrrelaventFile.php, AnotherIrrelaventFile.json Project /
ClassOne.php
ClassTwo.php
AnotherNamespace /
ClassOne.php
"autoload": {
"psr-4": {
"Project\\": "src"
}
}
src /
ClassOne.php # these files must all be in the Project namespace
ClassTwo.php
SubNamespace /
ClassOne.php
PSR-0 && classmap && files
PSR-4
composer create-project laravel/laravel new-project