composer常用指令

composer常用指令

只是常用指令,更多去https://docs.phpcomposer.com/03-cli.html查看
指令作用
composer require xx/xx安装某个包
composer install安装composer.json里的包
composer dump-autoload更新自动加载,比如手动修改 composer.json后用
composer update更新所有包
composer remove xx/xx卸载某个包
composer config –global –auth github-oauth.github.com <token> 加github的 token
composer config -gl查看当前的包地址
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer改镜像地址为aliyun的
composer info查看所有包信息
composer create-project xx/xx <save-path>创建项目 到 savepath

留下回复


Warning: is_dir(): open_basedir restriction in effect. File(/www/wwwroot/my-wordpress/index.php/2021/05/29/composer%E5%B8%B8%E7%94%A8%E6%8C%87%E4%BB%A4/) is not within the allowed path(s): (/www/wwwroot/my-wordpress/:/tmp/) in /www/wwwroot/my-wordpress/wp-content/plugins/matomo/classes/WpMatomo/AIBotTracking.php on line 175