composer更换国内源进行加速

composer源切换分为项目切换与全局切换

{info} 配置当前项目生效

composer config repo.packagist composer https://mirrors.aliyun.com/composer/
# 取消当前项目配置
composer config --unset repos.packagist

{info} 配置全局生效

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
# 取消全局配置
composer config -g --unset repos.packagist

{info} composer镜像源

      composer        https://packagist.org/
      phpcomposer     https://packagist.phpcomposer.com/
      aliyun          https://mirrors.aliyun.com/composer/
      tencent         https://mirrors.cloud.tencent.com/composer
      huawei          https://mirrors.huaweicloud.com/repository/php/
      laravel-china   https://packagist.laravel-china.org/
      cnpkg           https://php.cnpkg.org/
      sjtug           https://packagist.mirrors.sjtug.sjtu.edu.cn/

Notifications

Video is playing.