Blogger Information
Blog 19
fans 0
comment 0
visits 13335
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Composer 国内加速镜像
王浩
Original
621 people have browsed it

使用 Composer 镜像加速有两种选项

  • 选项一:全局配置,这样所有项目都能惠及(推荐);
  • 选项二:单独项目配置;

选项一、全局配置(推荐)

  1. $ composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

选项二、单独使用

如果仅限当前项目使用镜像,去掉 -g 即可,如下

  1. $ composer config repo.packagist composer https://mirrors.aliyun.com/composer/

取消镜像

  1. $ composer config -g --unset repos.packagist

打印调试信息

composer 命令后面加上 -vvv (是 3 个 v)可以打印出调错信息,命令如下:

  1. $ composer -vvv create-project laravel/laravel blog
  2. $ composer -vvv require psr/log
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post