function Application::getDefaultCommands
Same name in this branch
- 11.1.x vendor/symfony/console/Application.php \Symfony\Component\Console\Application::getDefaultCommands()
Initializes all the composer commands.
Return value
\Symfony\Component\Console\Command\Command[]
Overrides Application::getDefaultCommands
File
-
vendor/
composer/ composer/ src/ Composer/ Console/ Application.php, line 592
Class
- Application
- The console application that handles the commands
Namespace
Composer\ConsoleCode
protected function getDefaultCommands() : array {
$commands = array_merge(parent::getDefaultCommands(), [
new Command\AboutCommand(),
new Command\ConfigCommand(),
new Command\DependsCommand(),
new Command\ProhibitsCommand(),
new Command\InitCommand(),
new Command\InstallCommand(),
new Command\CreateProjectCommand(),
new Command\UpdateCommand(),
new Command\SearchCommand(),
new Command\ValidateCommand(),
new Command\AuditCommand(),
new Command\ShowCommand(),
new Command\SuggestsCommand(),
new Command\RequireCommand(),
new Command\DumpAutoloadCommand(),
new Command\StatusCommand(),
new Command\ArchiveCommand(),
new Command\DiagnoseCommand(),
new Command\RunScriptCommand(),
new Command\LicensesCommand(),
new Command\GlobalCommand(),
new Command\ClearCacheCommand(),
new Command\RemoveCommand(),
new Command\HomeCommand(),
new Command\ExecCommand(),
new Command\OutdatedCommand(),
new Command\CheckPlatformReqsCommand(),
new Command\FundCommand(),
new Command\ReinstallCommand(),
new Command\BumpCommand(),
]);
if (strpos(__FILE__, 'phar:') === 0 || '1' === Platform::getEnv('COMPOSER_TESTS_ARE_RUNNING')) {
$commands[] = new Command\SelfUpdateCommand();
}
return $commands;
}