发布者
发布Composer包,对应的资源需要开放访问权限
使用者
需要拥有Composer包对应的资源访问权限
参数 | 必选 | 描述 |
---|---|---|
type | 是 | 资源类型 |
url | 是 | 资源地址 |
单一仓库
{
"require": {
"catfan/medoo": "2.0",
"oss/php": "dev-master"
},
"config": {
"secure-http": false
},
"repositories": {
"packagist": {
"type": "composer",
"url": "http://packagist.cc"
}
}
}
多源
{
"require": {
"sen/csv": "dev-master",
"oss/php": "dev-master",
"php": ">=5.3.0"
},
"repositories": {
"packagist": {
"type": "composer",
"url": "http://packagist.cc"
},
"packagist_china": {
"type": "composer",
"url": "https://packagist.phpcomposer.com"
}
}
}
Url 修改为私有仓库地址即可