使用阿里云 composer 镜像为国内 composer 加速,阿里云composer 镜像与 Packagist 官方实时同步,推荐使用最新的 Composer 版本。
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
composer config -g --unset repos.packagist
composer config --global --list
# 输出
[repositories.packagist.org.type] composer
[repositories.packagist.org.url] https://mirrors.aliyun.com/composer/
[process-timeout] 300
[use-include-path] false
[preferred-install] dist
......
使用与阿里云镜像类似,详见见 pkg.xyz 官网 :