Composer 镜像设置

1. Composer 阿里云镜像

使用阿里云 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
......

2. 使用 pkg.xyz 镜像

使用与阿里云镜像类似,详见见 pkg.xyz 官网 :

https://pkg.xyz/