Exemplo n.º 1
0
 public function run()
 {
     $composer = new Components_Helper_Composer();
     $options = $this->_config->getOptions();
     $options['logger'] = $this->_output;
     $composer->generateComposeJson($this->_config->getComponent()->getPackageXmlPath(), $options);
 }
Exemplo n.º 2
0
 /**
  * Updates the composer.json file.
  *
  * @param array $options Options for the operation.
  *
  * @return string The success message.
  */
 public function updateComposer($options)
 {
     if (empty($options['pretend'])) {
         $composer = new Components_Helper_Composer();
         $composer->generateComposeJson($this->getPackageXmlPath());
         $result = 'Updated composer.json.';
     } else {
         $result = 'Would update composer.json now.';
     }
     if (!empty($options['commit'])) {
         $options['commit']->add($this->_directory . '/composer.json', $this->_directory);
     }
     return $result;
 }