Composer镜像源


Composer镜像源

Composer是 PHP 用来管理依赖(dependency)关系的工具。你可以在自己的项目中声明所依赖的外部工具库(libraries),Composer 会帮你安装这些依赖的库文件。

下载安装 Composer

https://getcomposer.org/download/

使用镜像

composer config -g repo.packagist composer 镜像地址

关闭镜像

composer config -g --unset repos.packagist

带有* -g *参数为全局生效,不携带则为当前项目生效

Packagist Composer 官方镜像

https://packagist.org/

Packagist / Composer 中国全量镜像

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 repo.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 repo.packagist composer https://packagist.mirrors.sjtug.sjtu.edu.cn/

清华大学 Composer 全量镜像

composer config -g repo.packagist composer https://mirrors.tuna.tsinghua.edu.cn/composer/

Packagist / JP

composer config -g repo.packagist composer https://packagist.jp