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

Breadcrumb

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

function Application::getDefaultCommands

Same name in this branch
  1. 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\Console

Code

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;
}

API Navigation

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