/**
  * Add missing definition options to the command usually defined by the application.
  *
  * @param BaseCommand $command The command to fix.
  *
  * @return void
  */
 protected function fixCommandDefinition(BaseCommand $command)
 {
     $definition = $command->getDefinition();
     if (!$definition->hasOption('verbose')) {
         $definition->addOption(new InputOption('verbose', 'v|vv|vvv', InputOption::VALUE_NONE, 'Shows more details including new commits pulled in when updating packages.'));
     }
 }
예제 #2
0
 /**
  * Add missing definition options to the command usually defined by the application.
  *
  * See also composer/composer in src/Composer/Console/Application.php
  *
  * @param BaseCommand $command The command to fix.
  *
  * @return void
  */
 protected function fixCommandDefinition(BaseCommand $command)
 {
     $definition = $command->getDefinition();
     if (!$definition->hasOption('verbose')) {
         $definition->addOption(new InputOption('verbose', 'v|vv|vvv', InputOption::VALUE_NONE, 'Shows more details including new commits pulled in when updating packages.'));
     }
     if (!$definition->hasOption('profile')) {
         $definition->addOption(new InputOption('profile', null, InputOption::VALUE_NONE, 'Display timing and memory usage information'));
     }
     if (!$definition->hasOption('no-plugins')) {
         $definition->addOption(new InputOption('no-plugins', null, InputOption::VALUE_NONE, 'Whether to disable plugins.'));
     }
     if (!$definition->hasOption('working-dir')) {
         $definition->addOption(new InputOption('working-dir', '-d', InputOption::VALUE_REQUIRED, 'If specified, use the given directory as working directory.'));
     }
 }