public function run() { $composer = new Components_Helper_Composer(); $options = $this->_config->getOptions(); $options['logger'] = $this->_output; $composer->generateComposeJson($this->_config->getComponent()->getPackageXmlPath(), $options); }
/** * 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; }