for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of tenside/core.
*
* (c) Christian Schiffler <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* This project is provided in good faith and hope to be usable by anyone.
* @package tenside/core
* @author Christian Schiffler <[email protected]>
* @copyright 2015 Christian Schiffler <[email protected]>
* @license https://github.com/tenside/core/blob/master/LICENSE MIT
* @link https://github.com/tenside/core
* @filesource
*/
namespace Tenside\Core\Task\Composer;
use Tenside\Core\Task\Composer\WrappedCommand\RequireCommand;
use Tenside\Core\Util\RuntimeHelper;
* This class holds the information for an installation request of a package (composer require).
class RequirePackageTask extends AbstractPackageManipulatingTask
{
* Returns 'upgrade'.
* {@inheritdoc}
public function getType()
return 'require-package';
}
* {@inheritDoc}
protected function prepareCommand()
// Switch home first, this is needed as the command manipulates the RAW composer.json prior to creating the
// composer instance.
RuntimeHelper::setupHome($this->getHome());
return $this->attachComposerFactory(new RequireCommand());