1
0
Fork 0

Add "r" alias for require (#10953)

Co-authored-by: a.dmitryuk <a.dmitryuk@movavi.com>
pull/10956/head
Alexander Dmitryuk 2022-07-18 18:04:49 +07:00 committed by GitHub
parent 31c7474cde
commit 8c488b9b08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -226,7 +226,7 @@ and this feature is only available for your root package 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`. 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 ## require / r
The `require` command adds new packages to the `composer.json` file from The `require` command adds new packages to the `composer.json` file from
the current directory. If no file exists one will be created on the fly. the current directory. If no file exists one will be created on the fly.

View File

@ -67,6 +67,7 @@ class RequireCommand extends BaseCommand
{ {
$this $this
->setName('require') ->setName('require')
->setAliases(array('r'))
->setDescription('Adds required packages to your composer.json and installs them.') ->setDescription('Adds required packages to your composer.json and installs them.')
->setDefinition(array( ->setDefinition(array(
new InputArgument('packages', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Optional package name can also include a version constraint, e.g. foo/bar or foo/bar:1.0.0 or foo/bar=1.0.0 or "foo/bar 1.0.0"', null, $this->suggestAvailablePackageInclPlatform()), new InputArgument('packages', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Optional package name can also include a version constraint, e.g. foo/bar or foo/bar:1.0.0 or foo/bar=1.0.0 or "foo/bar 1.0.0"', null, $this->suggestAvailablePackageInclPlatform()),