From d1ab1255b53d08575429c3a72c9e2549ebd559e7 Mon Sep 17 00:00:00 2001 From: Alexander Dmitryuk Date: Sat, 11 Mar 2023 03:27:20 +0600 Subject: [PATCH] Add rm alias to composer remove command (#11367) * rm alias * review --- doc/03-cli.md | 2 +- src/Composer/Command/RemoveCommand.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/03-cli.md b/doc/03-cli.md index 26c66c84d..df1a11905 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -298,7 +298,7 @@ If you do not specify a package, Composer will prompt you to search for a packag * **--apcu-autoloader-prefix:** Use a custom prefix for the APCu autoloader cache. Implicitly enables `--apcu-autoloader`. -## remove +## remove / rm The `remove` command removes packages from the `composer.json` file from the current directory. diff --git a/src/Composer/Command/RemoveCommand.php b/src/Composer/Command/RemoveCommand.php index 3b8ed88af..e808d63ab 100644 --- a/src/Composer/Command/RemoveCommand.php +++ b/src/Composer/Command/RemoveCommand.php @@ -43,6 +43,7 @@ class RemoveCommand extends BaseCommand { $this ->setName('remove') + ->setAliases(['rm']) ->setDescription('Removes a package from the require or require-dev') ->setDefinition([ new InputArgument('packages', InputArgument::IS_ARRAY, 'Packages that should be removed.', null, $this->suggestRootRequirement()), @@ -73,7 +74,7 @@ list of installed packages php composer.phar remove -Read more at https://getcomposer.org/doc/03-cli.md#remove +Read more at https://getcomposer.org/doc/03-cli.md#remove-rm EOT ) ;