查看当前镜像地址
初始化配置(无需运行)
composer config -g --unset repos.packagist
启用中国全量镜像服务
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer
composer config -g repo.packagist composer https://packagist.phpcomposer.com
中国镜像地址还原成默认地址:(注意:这个是将中国镜像还原)
composer config -g repo.packagist composer https://packagist.org
附加:
阿里云 Composer 镜像 https://mirrors.aliyun.com/composer/
腾讯云 Composer 镜像 https://mirrors.cloud.tencent.com/composer/
PHP国内Composer 镜像 https://packagist.phpcomposer.com
华为云 Composer 镜像 https://repo.huaweicloud.com/repository/php/
php.cnpkg.org镜像 https://php.cnpkg.org