Example #1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $wasUpdated = $this->composer->selfUpdate();
     if ($wasUpdated) {
         $this->info('Composer was updated');
         $this->comment($this->composer->getVersion());
     } else {
         $this->comment('Composer is already up to date');
     }
 }
Example #2
0
File: Which.php Project: newup/core
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $this->line('NewUp is using the Composer that can be found at this location:');
     $composer = $this->composer->findComposer();
     $this->line($composer);
     $formatter = $this->getHelper('formatter');
     if ($composer == 'composer') {
         $errorMessages = ['It appears that your composer.phar file is aliased, or set in a PATH variable', 'To find out where it is at, run the relevant command for your system:', 'Windows: where ' . $composer, 'Linux:   which ' . $composer];
         $formattedBlock = $formatter->formatBlock($errorMessages, 'comment', true);
         $this->output->writeln($formattedBlock);
     }
 }
Example #3
0
 /**
  * Configures a given package by name.
  *
  * Use this when you want to run something
  * like 'composer update'.
  *
  * @param $packageName
  * @return mixed
  */
 public function configurePackage($packageName)
 {
     $packagePath = $this->resolvePackagePath($packageName);
     $this->log->info('Attempting to configure package', ['package' => $packageName]);
     $this->composer->setWorkingPath($packagePath);
     $this->composer->updatePackageDependencies($this->preparePackageOptions($packageName));
 }
Example #4
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $this->line($this->composer->getVersion());
 }