1
0
Fork 0

Uniformize command description format, fixes #10971

pull/10982/head
Jordi Boggiano 2022-08-16 10:28:59 +02:00
parent d1f36f43c1
commit 7377d1f003
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
32 changed files with 32 additions and 32 deletions

View File

@ -28,7 +28,7 @@ class AboutCommand extends BaseCommand
{
$this
->setName('about')
->setDescription('Shows a short information about Composer.')
->setDescription('Shows a short information about Composer')
->setHelp(
<<<EOT
<info>php composer.phar about</info>

View File

@ -50,7 +50,7 @@ class ArchiveCommand extends BaseCommand
{
$this
->setName('archive')
->setDescription('Creates an archive of this composer package.')
->setDescription('Creates an archive of this composer package')
->setDefinition(array(
new InputArgument('package', InputArgument::OPTIONAL, 'The package to archive instead of the current project', null, $this->suggestAvailablePackage()),
new InputArgument('version', InputArgument::OPTIONAL, 'A version constraint to find the package to archive'),

View File

@ -18,7 +18,7 @@ class AuditCommand extends BaseCommand
{
$this
->setName('audit')
->setDescription('Checks for security vulnerability advisories for installed packages.')
->setDescription('Checks for security vulnerability advisories for installed packages')
->setDefinition(array(
new InputOption('no-dev', null, InputOption::VALUE_NONE, 'Disables auditing of require-dev packages.'),
new InputOption('format', 'f', InputOption::VALUE_REQUIRED, 'Output format. Must be "table", "plain", "json", or "summary".', Auditor::FORMAT_TABLE, Auditor::FORMATS),

View File

@ -51,7 +51,7 @@ final class BumpCommand extends BaseCommand
{
$this
->setName('bump')
->setDescription('Increases the lower limit of your composer.json requirements to the currently installed versions.')
->setDescription('Increases the lower limit of your composer.json requirements to the currently installed versions')
->setDefinition(array(
new InputArgument('packages', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Optional package name(s) to restrict which packages are bumped.', null, $this->suggestRootRequirement()),
new InputOption('dev-only', 'D', InputOption::VALUE_NONE, 'Only bump requirements in "require-dev".'),

View File

@ -29,7 +29,7 @@ class CheckPlatformReqsCommand extends BaseCommand
protected function configure(): void
{
$this->setName('check-platform-reqs')
->setDescription('Check that platform requirements are satisfied.')
->setDescription('Check that platform requirements are satisfied')
->setDefinition(array(
new InputOption('no-dev', null, InputOption::VALUE_NONE, 'Disables checking of require-dev packages requirements.'),
new InputOption('lock', null, InputOption::VALUE_NONE, 'Checks requirements only from the lock file, not from installed packages.'),

View File

@ -31,7 +31,7 @@ class ClearCacheCommand extends BaseCommand
$this
->setName('clear-cache')
->setAliases(array('clearcache', 'cc'))
->setDescription('Clears composer\'s internal package cache.')
->setDescription('Clears composer\'s internal package cache')
->setDefinition(array(
new InputOption('gc', null, InputOption::VALUE_NONE, 'Only run garbage collection, not a full cache clear'),
))

View File

@ -66,7 +66,7 @@ class ConfigCommand extends BaseCommand
{
$this
->setName('config')
->setDescription('Sets config options.')
->setDescription('Sets config options')
->setDefinition(array(
new InputOption('global', 'g', InputOption::VALUE_NONE, 'Apply command to the global config file'),
new InputOption('editor', 'e', InputOption::VALUE_NONE, 'Open editor'),

View File

@ -72,7 +72,7 @@ class CreateProjectCommand extends BaseCommand
{
$this
->setName('create-project')
->setDescription('Creates new project from a package into given directory.')
->setDescription('Creates new project from a package into given directory')
->setDefinition(array(
new InputArgument('package', InputArgument::OPTIONAL, 'Package name to be installed', null, $this->suggestAvailablePackage()),
new InputArgument('directory', InputArgument::OPTIONAL, 'Directory where the files should be created'),

View File

@ -34,7 +34,7 @@ class DependsCommand extends BaseDependencyCommand
$this
->setName('depends')
->setAliases(array('why'))
->setDescription('Shows which packages cause the given package to be installed.')
->setDescription('Shows which packages cause the given package to be installed')
->setDefinition(array(
new InputArgument(self::ARGUMENT_PACKAGE, InputArgument::REQUIRED, 'Package to inspect', null, $this->suggestInstalledPackage(true, true)),
new InputOption(self::OPTION_RECURSIVE, 'r', InputOption::VALUE_NONE, 'Recursively resolves up to the root package'),

View File

@ -57,7 +57,7 @@ class DiagnoseCommand extends BaseCommand
{
$this
->setName('diagnose')
->setDescription('Diagnoses the system to identify common errors.')
->setDescription('Diagnoses the system to identify common errors')
->setHelp(
<<<EOT
The <info>diagnose</info> command checks common errors to help debugging problems.

View File

@ -31,7 +31,7 @@ class DumpAutoloadCommand extends BaseCommand
$this
->setName('dump-autoload')
->setAliases(array('dumpautoload'))
->setDescription('Dumps the autoloader.')
->setDescription('Dumps the autoloader')
->setDefinition(array(
new InputOption('optimize', 'o', InputOption::VALUE_NONE, 'Optimizes PSR0 and PSR4 packages to be loaded with classmaps too, good for production.'),
new InputOption('classmap-authoritative', 'a', InputOption::VALUE_NONE, 'Autoload classes from the classmap only. Implicitly enables `--optimize`.'),

View File

@ -29,7 +29,7 @@ class ExecCommand extends BaseCommand
{
$this
->setName('exec')
->setDescription('Executes a vendored binary/script.')
->setDescription('Executes a vendored binary/script')
->setDefinition(array(
new InputOption('list', 'l', InputOption::VALUE_NONE),
new InputArgument('binary', InputArgument::OPTIONAL, 'The binary to run, e.g. phpunit', null, function () {

View File

@ -36,7 +36,7 @@ class FundCommand extends BaseCommand
protected function configure(): void
{
$this->setName('fund')
->setDescription('Discover how to help fund the maintenance of your dependencies.')
->setDescription('Discover how to help fund the maintenance of your dependencies')
->setDefinition(array(
new InputOption('format', 'f', InputOption::VALUE_REQUIRED, 'Format of the output: text or json', 'text', ['text', 'json']),
))

View File

@ -58,7 +58,7 @@ class GlobalCommand extends BaseCommand
{
$this
->setName('global')
->setDescription('Allows running commands in the global composer dir ($COMPOSER_HOME).')
->setDescription('Allows running commands in the global composer dir ($COMPOSER_HOME)')
->setDefinition(array(
new InputArgument('command-name', InputArgument::REQUIRED, ''),
new InputArgument('args', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, ''),

View File

@ -40,7 +40,7 @@ class HomeCommand extends BaseCommand
$this
->setName('browse')
->setAliases(array('home'))
->setDescription('Opens the package\'s repository URL or homepage in your browser.')
->setDescription('Opens the package\'s repository URL or homepage in your browser')
->setDefinition(array(
new InputArgument('packages', InputArgument::IS_ARRAY, 'Package(s) to browse to.', null, $this->suggestInstalledPackage()),
new InputOption('homepage', 'H', InputOption::VALUE_NONE, 'Open the homepage instead of the repository URL.'),

View File

@ -52,7 +52,7 @@ class InitCommand extends BaseCommand
{
$this
->setName('init')
->setDescription('Creates a basic composer.json file in current directory.')
->setDescription('Creates a basic composer.json file in current directory')
->setDefinition(array(
new InputOption('name', null, InputOption::VALUE_REQUIRED, 'Name of the package'),
new InputOption('description', null, InputOption::VALUE_REQUIRED, 'Description of package'),

View File

@ -40,7 +40,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.')
->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.'),
new InputOption('prefer-dist', null, InputOption::VALUE_NONE, 'Forces installation from package dist (default behavior).'),

View File

@ -40,7 +40,7 @@ class LicensesCommand extends BaseCommand
{
$this
->setName('licenses')
->setDescription('Shows information about licenses of dependencies.')
->setDescription('Shows information about licenses of dependencies')
->setDefinition(array(
new InputOption('format', 'f', InputOption::VALUE_REQUIRED, 'Format of the output: text, json or summary', 'text', ['text', 'json', 'summary']),
new InputOption('no-dev', null, InputOption::VALUE_NONE, 'Disables search in require-dev packages.'),

View File

@ -32,7 +32,7 @@ class OutdatedCommand extends BaseCommand
{
$this
->setName('outdated')
->setDescription('Shows a list of installed packages that have updates available, including their latest version.')
->setDescription('Shows a list of installed packages that have updates available, including their latest version')
->setDefinition(array(
new InputArgument('package', InputArgument::OPTIONAL, 'Package to inspect. Or a name including a wildcard (*) to filter lists of packages instead.', null, $this->suggestInstalledPackage(false)),
new InputOption('outdated', 'o', InputOption::VALUE_NONE, 'Show only packages that are outdated (this is the default, but present here for compat with `show`'),

View File

@ -34,7 +34,7 @@ class ProhibitsCommand extends BaseDependencyCommand
$this
->setName('prohibits')
->setAliases(array('why-not'))
->setDescription('Shows which packages prevent the given package from being installed.')
->setDescription('Shows which packages prevent the given package from being installed')
->setDefinition(array(
new InputArgument(self::ARGUMENT_PACKAGE, InputArgument::REQUIRED, 'Package to inspect', null, $this->suggestAvailablePackage()),
new InputArgument(self::ARGUMENT_CONSTRAINT, InputArgument::REQUIRED, 'Version constraint, which version you expected to be installed'),

View File

@ -42,7 +42,7 @@ class RemoveCommand extends BaseCommand
{
$this
->setName('remove')
->setDescription('Removes a package from the require or require-dev.')
->setDescription('Removes a package from the require or require-dev')
->setDefinition(array(
new InputArgument('packages', InputArgument::IS_ARRAY | InputArgument::REQUIRED, 'Packages that should be removed.', null, $this->suggestInstalledPackage(false, true)),
new InputOption('dev', null, InputOption::VALUE_NONE, 'Removes a package from the require-dev section.'),

View File

@ -72,7 +72,7 @@ class RequireCommand extends BaseCommand
$this
->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(
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 InputOption('dev', null, InputOption::VALUE_NONE, 'Add requirement to require-dev.'),

View File

@ -52,7 +52,7 @@ class RunScriptCommand extends BaseCommand
$this
->setName('run-script')
->setAliases(array('run'))
->setDescription('Runs the scripts defined in composer.json.')
->setDescription('Runs the scripts defined in composer.json')
->setDefinition(array(
new InputArgument('script', InputArgument::OPTIONAL, 'Script name to run.', null, function () {
return array_keys($this->requireComposer()->getPackage()->getScripts());

View File

@ -30,7 +30,7 @@ class ScriptAliasCommand extends BaseCommand
public function __construct(string $script, ?string $description)
{
$this->script = $script;
$this->description = $description ?? 'Runs the '.$script.' script as defined in composer.json.';
$this->description = $description ?? 'Runs the '.$script.' script as defined in composer.json';
parent::__construct();
}

View File

@ -37,7 +37,7 @@ class SearchCommand extends BaseCommand
{
$this
->setName('search')
->setDescription('Searches for packages.')
->setDescription('Searches for packages')
->setDefinition(array(
new InputOption('only-name', 'N', InputOption::VALUE_NONE, 'Search only in package names'),
new InputOption('only-vendor', 'O', InputOption::VALUE_NONE, 'Search only for vendor / organization names, returns only "vendor" as result'),

View File

@ -47,7 +47,7 @@ class SelfUpdateCommand extends BaseCommand
$this
->setName('self-update')
->setAliases(array('selfupdate'))
->setDescription('Updates composer.phar to the latest version.')
->setDescription('Updates composer.phar to the latest version')
->setDefinition(array(
new InputOption('rollback', 'r', InputOption::VALUE_NONE, 'Revert to an older installation of composer'),
new InputOption('clean-backups', null, InputOption::VALUE_NONE, 'Delete old backups during an update. This makes the current version of composer the only backup available after the update'),

View File

@ -76,7 +76,7 @@ class ShowCommand extends BaseCommand
$this
->setName('show')
->setAliases(array('info'))
->setDescription('Shows information about packages.')
->setDescription('Shows information about packages')
->setDefinition(array(
new InputArgument('package', InputArgument::OPTIONAL, 'Package to inspect. Or a name including a wildcard (*) to filter lists of packages instead.', null, $this->suggestPackageBasedOnMode()),
new InputArgument('version', InputArgument::OPTIONAL, 'Version or version constraint to inspect'),

View File

@ -44,7 +44,7 @@ class StatusCommand extends BaseCommand
{
$this
->setName('status')
->setDescription('Shows a list of locally modified packages.')
->setDescription('Shows a list of locally modified packages')
->setDefinition(array(
new InputOption('verbose', 'v|vv|vvv', InputOption::VALUE_NONE, 'Show modified files for each directory that contains changes.'),
))

View File

@ -32,7 +32,7 @@ class SuggestsCommand extends BaseCommand
{
$this
->setName('suggests')
->setDescription('Shows package suggestions.')
->setDescription('Shows package suggestions')
->setDefinition(array(
new InputOption('by-package', null, InputOption::VALUE_NONE, 'Groups output by suggesting package (default)'),
new InputOption('by-suggestion', null, InputOption::VALUE_NONE, 'Groups output by suggested package'),

View File

@ -49,7 +49,7 @@ class UpdateCommand extends BaseCommand
$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.')
->setDescription('Updates 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.', null, $this->suggestInstalledPackage(false)),
new InputOption('with', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Temporary version constraint to add, e.g. foo/bar:1.0.0 or foo/bar=1.0.0'),

View File

@ -42,7 +42,7 @@ class ValidateCommand extends BaseCommand
{
$this
->setName('validate')
->setDescription('Validates a composer.json and composer.lock.')
->setDescription('Validates a composer.json and composer.lock')
->setDefinition(array(
new InputOption('no-check-all', null, InputOption::VALUE_NONE, 'Do not validate requires for overly strict/loose constraints'),
new InputOption('check-lock', null, InputOption::VALUE_NONE, 'Check if lock file is up to date (even when config.lock is false)'),

View File

@ -108,7 +108,7 @@ class RunScriptCommandTest extends TestCase
$output = $appTester->getDisplay();
$this->assertStringContainsString('Runs the test script as defined in composer.json.', $output, 'The default description for the test script should be printed');
$this->assertStringContainsString('Runs the test script as defined in composer.json', $output, 'The default description for the test script should be printed');
$this->assertStringContainsString('Run the codestyle fixer', $output, 'The custom description for the fix-cs script should be printed');
}