系统全局配置:
可以使用 composer config -l -g 查看所有全局配置
单个项目配置:
在当前项目根目录可以使用 composer config -l 查看当前项目镜像配置
设置国内镜像源一全局配置
composer config -g repo.packagist composer https://packagist.phpcomposer.com
设置国内镜像源一单项目配置
composer config repo.packagist composer https://packagist.phpcomposer.com
设置国内镜像源一composer.json
"repositories": {
"packagist": {
"type": "composer",
"url": "https://packagist.phpcomposer.com"
}
}
取消全局镜像源配置:
composer config -g --unset repos.packagist
取消当前镜像源配置:
composer config --unset repos.packagist