Composer 国内加速,修改镜像源

如何修改镜像源

可以使用阿里巴巴提供的 Composer 全量镜像 https://mirrors.aliyun.com/composer/

a). 配置只在当前项目生效

composer config repo.packagist composer https://mirrors.aliyun.com/composer/

 取消当前项目配置
composer config --unset repos.packagist
b). 配置全局生效
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

 取消全局配置
composer config -g --unset repos.packagist

发表评论