composer常用指令
// 查询版本信息
composer -v
// 注册并生效
composer dumpautoload
// 交互式创建配置文件`composer.json`
composer init
// 安装包
composer install
// 符合最新版本的依赖
composer update
composer.json配置文件
{
"autoload":{
"classmap":[
"inc/",
"MyClass.php"
],
"files":[
"config/connect.php",
"lib/helper.php"
],
"psr-4":{
"phpcn\\": "admin/"
}
},
"require":{
"gregwar/captcha": "^1.1",
"catfan/medoo": "^2.1"
}
}