composer更新版本

composer更新版本

1、查看当前composer版本(大写的V)
composer -V
2、当前composer更新为最新稳定版
composer self-update --stable
3、更新到指定版本
composer self-update 2.0.8
4、 版本回滚

回滚到安装的上一个版本

composer self-update --rollback
5、版本更新并删除旧版本的备份
composer self-update --clean-backups
6、composer self-update 参数详解
# composer self-update --help
Description:
  Updates composer.phar to the latest version

Usage:
  self-update [options] [--] [<version>]
  selfupdate

Arguments:
  version                        The version to update to

Options:
  -r, --rollback                 Revert to an older installation of composer
      --clean-backups            Delete old backups during an update. This makes the current version of composer the only backup available after the update
      --no-progress              Do not output download progress.
      --update-keys              Prompt user for a key update
      --stable                   Force an update to the stable channel
      --preview                  Force an update to the preview channel
      --snapshot                 Force an update to the snapshot channel
      --1                        Force an update to the stable channel, but only use 1.x versions
      --2                        Force an update to the stable channel, but only use 2.x versions
      --2.2                      Force an update to the stable channel, but only use 2.2.x LTS versions
      --set-channel-only         Only store the channel as the default one and then exit
  -h, --help                     Display help for the given command. When no command is given display help for the list command
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi|--no-ansi           Force (or disable --no-ansi) ANSI output
  -n, --no-interaction           Do not ask any interactive question
      --profile                  Display timing and memory usage information
      --no-plugins               Whether to disable plugins.
      --no-scripts               Skips the execution of all scripts defined in composer.json file.
  -d, --working-dir=WORKING-DIR  If specified, use the given directory as working directory.
      --no-cache                 Prevent use of the cache
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  The self-update command checks getcomposer.org for newer
  versions of composer and if found, installs the latest.

  php composer.phar self-update

  Read more at https://getcomposer.org/doc/03-cli.md#self-update-selfupdate
  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值