function SearchCommand::configure
Overrides Command::configure
File
-
vendor/
composer/ composer/ src/ Composer/ Command/ SearchCommand.php, line 33
Class
- SearchCommand
- @author Robert Schönthal <seroscho@googlemail.com>
Namespace
Composer\CommandCode
protected function configure() : void {
$this->setName('search')
->setDescription('Searches for packages')
->setDefinition([
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'),
new InputOption('type', 't', InputOption::VALUE_REQUIRED, 'Search for a specific package type'),
new InputOption('format', 'f', InputOption::VALUE_REQUIRED, 'Format of the output: text or json', 'text', [
'json',
'text',
]),
new InputArgument('tokens', InputArgument::IS_ARRAY | InputArgument::REQUIRED, 'tokens to search for'),
])
->setHelp(<<<EOT
The search command searches for packages by its name
<info>php composer.phar search symfony composer</info>
Read more at https://getcomposer.org/doc/03-cli.md#search
EOT
);
}