composer 国内镜像
本文列举一些最常用的国内镜像,配置国内镜像后可以提高composer包的下载速度。使用阿里云镜像的开发者较多,我也一直在使用这个镜像。
1. composer 中文网提供的中国全量镜像
https://pkg.phpcomposer.com/#how-to-use-packagist-mirror
composer config -g repo.packagist composer https://packagist.phpcomposer.com
composer config -g repos.packagist composer https://php.cnpkg.org
2. 阿里云composer镜像(很多开发者在使用这个镜像)
https://developer.aliyun.com/composer
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
3. 腾讯云composer镜像
https://mirrors.cloud.tencent.com/help/composer.html
composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/
4. 删除全局镜像配置
composer config -g --unset repo.packagist