1、brew install composer
上面是一个坑
使用:
php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
mv composer.phar /usr/local/bin/composer
全局修改源
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
全局取消源
composer config -g --unset repos.packagist
项目修改源,需指定当前项目下的composer.phar
composer config repo.packagist composer https://mirrors.aliyun.com/composer/
项目取消源
composer config --unset repos.packagist
安装时看具体安装信息
composer -vvv require alibabacloud/sdk
增加 -vvv