From b63e2de819acd7d571f2a51023484335eb31b6a0 Mon Sep 17 00:00:00 2001 From: refael iliaguyev Date: Wed, 11 Jul 2018 20:21:09 +0300 Subject: [PATCH 1/2] add alias `i` to the install command --- doc/03-cli.md | 2 +- src/Composer/Command/InstallCommand.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/03-cli.md b/doc/03-cli.md index ef2f13523..40c141cec 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -65,7 +65,7 @@ php composer.phar init to a `composer` repository or a JSON string which similar to what the [repositories](04-schema.md#repositories) key accepts. -## install +## install / i The `install` command reads the `composer.json` file from the current directory, resolves the dependencies, and installs them into `vendor`. diff --git a/src/Composer/Command/InstallCommand.php b/src/Composer/Command/InstallCommand.php index b6ca802eb..7a8980cc4 100644 --- a/src/Composer/Command/InstallCommand.php +++ b/src/Composer/Command/InstallCommand.php @@ -32,6 +32,7 @@ class InstallCommand extends BaseCommand { $this ->setName('install') + ->setAliases(array('i')) ->setDescription('Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.') ->setDefinition(array( new InputOption('prefer-source', null, InputOption::VALUE_NONE, 'Forces installation from package sources when possible, including VCS information.'), From 2f347e134721b3b6ee825fca273ca056e5cedbd3 Mon Sep 17 00:00:00 2001 From: refael iliaguyev Date: Thu, 19 Jul 2018 11:38:43 +0300 Subject: [PATCH 2/2] add alias `u` to the update command --- doc/03-cli.md | 2 +- src/Composer/Command/UpdateCommand.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/03-cli.md b/doc/03-cli.md index 40c141cec..0b46e04f5 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -115,7 +115,7 @@ resolution. requirements and force the installation even if the local machine does not fulfill these. See also the [`platform`](06-config.md#platform) config option. -## update +## update / u In order to get the latest versions of the dependencies and to update the `composer.lock` file, you should use the `update` command. This command is also diff --git a/src/Composer/Command/UpdateCommand.php b/src/Composer/Command/UpdateCommand.php index 1610d2872..1d67f1f9b 100644 --- a/src/Composer/Command/UpdateCommand.php +++ b/src/Composer/Command/UpdateCommand.php @@ -34,7 +34,7 @@ class UpdateCommand extends BaseCommand { $this ->setName('update') - ->setAliases(array('upgrade')) + ->setAliases(array('u', 'upgrade')) ->setDescription('Upgrades your dependencies to the latest version according to composer.json, and updates the composer.lock file.') ->setDefinition(array( new InputArgument('packages', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Packages that should be updated, if not provided all packages are.'),