function GlobalCommand::configure
Overrides Command::configure
File
-
vendor/
composer/ composer/ src/ Composer/ Command/ GlobalCommand.php, line 58
Class
- GlobalCommand
- @author Jordi Boggiano <j.boggiano@seld.be>
Namespace
Composer\CommandCode
protected function configure() : void {
$this->setName('global')
->setDescription('Allows running commands in the global composer dir ($COMPOSER_HOME)')
->setDefinition([
new InputArgument('command-name', InputArgument::REQUIRED, ''),
new InputArgument('args', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, ''),
])
->setHelp(<<<EOT
Use this command as a wrapper to run other Composer commands
within the global context of COMPOSER_HOME.
You can use this to install CLI utilities globally, all you need
is to add the COMPOSER_HOME/vendor/bin dir to your PATH env var.
COMPOSER_HOME is c:\\Users\\<user>\\AppData\\Roaming\\Composer on Windows
and /home/<user>/.composer on unix systems.
If your system uses freedesktop.org standards, then it will first check
XDG_CONFIG_HOME or default to /home/<user>/.config/composer
Note: This path may vary depending on customizations to bin-dir in
composer.json or the environmental variable COMPOSER_BIN_DIR.
Read more at https://getcomposer.org/doc/03-cli.md#global
EOT
);
}