Linux 安装composer备忘录
安装
curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
更新源, -g 参数是全局,取消则是当前项目
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
撤销设置
composer config -g --unset repos.packagist
升级
composer self-update
执行诊断命令:
composer diagnose
清除缓存:
composer clear
若项目之前已通过其他源安装,则需要更新 composer.lock 文件,执行命令:
composer update --lock
none