我知道"install"one_answers";update"但我没有发现composer update
和composer upgrade
之间的差异。
它们是同一个命令,upgrade
只是update
的别名。
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
(列出命令别名)