简体   繁体   English

“作曲家更新”和“作曲家升级”有什么区别?

[英]What is difference between "composer update" and "composer upgrade"?

我知道“安装”和“更新”之间的区别,但我找不到composer updatecomposer upgrade之间的区别。

They are both the same command, upgrade is just an alias for update .它们都是相同的命令, upgrade只是update的别名。

see UpdateCommand source :请参阅UpdateCommand源代码

class UpdateCommand extends BaseCommand
...
    protected function configure()
    {
        $this
            ->setName('update')
            ->setAliases(array('u', 'upgrade'))
            ->setDescription('Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file.')

(sets the command aliases) (设置命令别名)

compare composer list invocation:比较作曲家列表调用:

$ composer list | grep '^ *\(update\|upgrade\|install\) '
  install              Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.
  update               Upgrades your dependencies to the latest version according to composer.json, and updates the composer.lock file.
  upgrade              Upgrades your dependencies to the latest version according to composer.json, and updates the composer.lock file.

(the description is identical) (描述相同)

and composer composer update --help invocation:和 composer composer update --help调用:

$ composer update --help | sed -ne '1,/^$/p'
Usage:
  update [options] [--] [<packages>]...
  u
  upgrade

(lists the command aliases) (列出命令别名)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM