From 1cb6bbe5504a8618c5200e671c5d544217a53f43 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Thu, 30 Apr 2020 19:50:53 +0200 Subject: [PATCH 1/2] Clarify composer update mirrors/nothing/lock Addresses https://github.com/composer/composer/issues/7459 by listing these special arguments in the documentation. --- doc/03-cli.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/03-cli.md b/doc/03-cli.md index 29eeb398c..0c41e9ef7 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -174,6 +174,8 @@ php composer.phar update "vendor/*" * **--interactive:** Interactive interface with autocompletion to select the packages to update. * **--root-reqs:** Restricts the update to your first degree dependencies. +Specifying one of the words `mirrors`, `lock`, or `nothing` as an argument has the same effect as specifying the option `--lock`, for example `composer update mirrors` is exactly the same as `composer update --lock`. + ## require The `require` command adds new packages to the `composer.json` file from From bfe71fb9520c0862f3465e4e92af43d178b4955c Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 1 May 2020 18:03:22 +0200 Subject: [PATCH 2/2] Fix support for --self --name-only, fixes #8844 --- src/Composer/Command/ShowCommand.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index b515cc6a9..40d4f5981 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -152,6 +152,10 @@ EOT if ($input->getOption('self')) { $package = $this->getComposer()->getPackage(); + if ($input->getOption('name-only')) { + $io->write($package->getName()); + return 0; + } $repos = $installedRepo = new ArrayRepository(array($package)); } elseif ($input->getOption('platform')) { $repos = $installedRepo = $platformRepo;