"composer update"和"composer upgrade"有什么区别?



我知道"install"one_answers";update"但我没有发现composer updatecomposer upgrade之间的差异。

它们是同一个命令,upgrade只是update的别名。

<<p>看到strong> 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.')

(设置命令别名)

comparecomposer list调用:

$ 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.

(描述相同)

and composercomposer update -help调用:

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

(列出命令别名)

相关内容

  • 没有找到相关文章

最新更新