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

Breadcrumb

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

function SelfUpdateCommand::configure

Overrides Command::configure

File

vendor/composer/composer/src/Composer/Command/SelfUpdateCommand.php, line 42

Class

SelfUpdateCommand
@author Igor Wiedler <igor@wiedler.ch> @author Kevin Ran <kran@adobe.com> @author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Composer\Command

Code

protected function configure() : void {
    $this->setName('self-update')
        ->setAliases([
        'selfupdate',
    ])
        ->setDescription('Updates composer.phar to the latest version')
        ->setDefinition([
        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'),
        new InputArgument('version', InputArgument::OPTIONAL, 'The version to update to'),
        new InputOption('no-progress', null, InputOption::VALUE_NONE, 'Do not output download progress.'),
        new InputOption('update-keys', null, InputOption::VALUE_NONE, 'Prompt user for a key update'),
        new InputOption('stable', null, InputOption::VALUE_NONE, 'Force an update to the stable channel'),
        new InputOption('preview', null, InputOption::VALUE_NONE, 'Force an update to the preview channel'),
        new InputOption('snapshot', null, InputOption::VALUE_NONE, 'Force an update to the snapshot channel'),
        new InputOption('1', null, InputOption::VALUE_NONE, 'Force an update to the stable channel, but only use 1.x versions'),
        new InputOption('2', null, InputOption::VALUE_NONE, 'Force an update to the stable channel, but only use 2.x versions'),
        new InputOption('2.2', null, InputOption::VALUE_NONE, 'Force an update to the stable channel, but only use 2.2.x LTS versions'),
        new InputOption('set-channel-only', null, InputOption::VALUE_NONE, 'Only store the channel as the default one and then exit'),
    ])
        ->setHelp(<<<EOT
The <info>self-update</info> command checks getcomposer.org for newer
versions of composer and if found, installs the latest.

<info>php composer.phar self-update</info>

Read more at https://getcomposer.org/doc/03-cli.md#self-update-selfupdate
EOT
);
}

API Navigation

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