阿里云推出Composer全量镜像,与Packagist官方实时同步,每个30秒刷新全国CDN缓存,码笔记推荐使用Composer最新版本:
Composer下载地址
https://mirrors.aliyun.com/composer/composer.phar
全局配置(推荐)
所有项目都会使用该镜像地址:
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
取消配置:
composer config -g --unset repos.packagist
项目配置
仅修改当前工程配置,仅当前工程可使用该镜像地址:
composer config repo.packagist composer https://mirrors.aliyun.com/composer/
取消配置:
composer config --unset repos.packagist
调试
composer 命令增加 -vvv 可输出详细的信息,命令如下:
composer -vvv require alibabacloud/sdk
Composer常见问题及解答:
composer self-update
composer diagnose
composer clear
composer update --lock
2024年云服务器租用优惠价格,11月最新: