PHP Composer 配置和取消中国镜像的方法 PHP

Skiy 11月前 152

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

$ composer config -g repo.packagist composer https://packagist.laravel-china.org

选项二、单独使用

如果仅限当前工程使用镜像,去掉 -g 即可,如下:

$ composer config repo.packagist composer https://packagist.laravel-china.org

取消镜像

$ composer config -g --unset repos.packagist

查看全局配置

$ composer config -gl

清理缓存

$ composer clear-cache


最新回复 (2)
返回
发新帖