Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ShowCommand.php

function ShowCommand::configure

Return value

void

Overrides Command::configure

File

vendor/composer/composer/src/Composer/Command/ShowCommand.php, line 79

Class

ShowCommand
@author Robert Schönthal <seroscho@googlemail.com> @author Jordi Boggiano <j.boggiano@seld.be> @author Jérémy Romey <jeremyFreeAgent> @author Mihai Plasoianu <mihai@plasoianu.de>

Namespace

Composer\Command

Code

protected function configure() {
    $this->setName('show')
        ->setAliases([
        'info',
    ])
        ->setDescription('Shows information about packages')
        ->setDefinition([
        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'),
        new InputOption('all', null, InputOption::VALUE_NONE, 'List all packages'),
        new InputOption('locked', null, InputOption::VALUE_NONE, 'List all locked packages'),
        new InputOption('installed', 'i', InputOption::VALUE_NONE, 'List installed packages only (enabled by default, only present for BC).'),
        new InputOption('platform', 'p', InputOption::VALUE_NONE, 'List platform packages only'),
        new InputOption('available', 'a', InputOption::VALUE_NONE, 'List available packages only'),
        new InputOption('self', 's', InputOption::VALUE_NONE, 'Show the root package information'),
        new InputOption('name-only', 'N', InputOption::VALUE_NONE, 'List package names only'),
        new InputOption('path', 'P', InputOption::VALUE_NONE, 'Show package paths'),
        new InputOption('tree', 't', InputOption::VALUE_NONE, 'List the dependencies as a tree'),
        new InputOption('latest', 'l', InputOption::VALUE_NONE, 'Show the latest version'),
        new InputOption('outdated', 'o', InputOption::VALUE_NONE, 'Show the latest version but only for packages that are outdated'),
        new InputOption('ignore', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Ignore specified package(s). Can contain wildcards (*). Use it with the --outdated option if you don\'t want to be informed about new versions of some packages.', null, $this->suggestInstalledPackage(false)),
        new InputOption('major-only', 'M', InputOption::VALUE_NONE, 'Show only packages that have major SemVer-compatible updates. Use with the --latest or --outdated option.'),
        new InputOption('minor-only', 'm', InputOption::VALUE_NONE, 'Show only packages that have minor SemVer-compatible updates. Use with the --latest or --outdated option.'),
        new InputOption('patch-only', null, InputOption::VALUE_NONE, 'Show only packages that have patch SemVer-compatible updates. Use with the --latest or --outdated option.'),
        new InputOption('sort-by-age', 'A', InputOption::VALUE_NONE, 'Displays the installed version\'s age, and sorts packages oldest first. Use with the --latest or --outdated option.'),
        new InputOption('direct', 'D', InputOption::VALUE_NONE, 'Shows only packages that are directly required by the root package'),
        new InputOption('strict', null, InputOption::VALUE_NONE, 'Return a non-zero exit code when there are outdated packages'),
        new InputOption('format', 'f', InputOption::VALUE_REQUIRED, 'Format of the output: text or json', 'text', [
            'json',
            'text',
        ]),
        new InputOption('no-dev', null, InputOption::VALUE_NONE, 'Disables search in require-dev packages.'),
        new InputOption('ignore-platform-req', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Ignore a specific platform requirement (php & ext- packages). Use with the --outdated option'),
        new InputOption('ignore-platform-reqs', null, InputOption::VALUE_NONE, 'Ignore all platform requirements (php & ext- packages). Use with the --outdated option'),
    ])
        ->setHelp(<<<EOT
The show command displays detailed information about a package, or
lists all packages available.

Read more at https://getcomposer.org/doc/03-cli.md#show-info
EOT
);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal