以下配置为全局配置,单项目配置请自行百度
最近使用composer中国镜像(https://www.phpcomposer.com/)过程中,发现服务异常慢,以往秒级下载耗时的,居然达到小时级
composer config -g repo.packagist composer https://packagist.phpcomposer.com
于是寻找国内替代源,发现阿里云也提供了composer的全量镜像源,修改如下,速度立即飙升正常~
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
补充:
腾讯云Composer全量镜像源:
composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/
华为云Composer全量镜像:
composer config -g repo.packagist composer https://mirrors.huaweicloud.com/repository/php/
安畅网络Composer全量镜像:
composer config -g repos.packagist composer https://cnpkg.org