for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Robo\Task\Composer;
/**
* Composer CreateProject
*
* ``` php
* <?php
* // simple execution
* $this->taskComposerCreateProject()->source('foo/bar')->target('myBar')->run();
* ?>
* ```
*/
class CreateProject extends Base
{
* {@inheritdoc}
protected $action = 'create-project';
protected $source;
protected $target = '';
protected $version = '';
* @return $this
public function source($source)
$this->source = $source;
return $this;
}
public function target($target)
$this->target = $target;
public function version($version)
$this->version = $version;
public function keepVcs($keep = true)
if ($keep) {
$this->option('--keep-vcs');
public function install($install = true)
if (!$install) {
return $this->noInstall();
public function noInstall()
$this->option('--no-install');
public function repository($repository)
$this->option('repository', $repository);
public function buildCommand()
$this->arg($this->source);
$this->arg($this->target);
$this->arg($this->version);
return parent::buildCommand();
public function run()
$command = $this->getCommand();
$this->printTaskInfo('Creating project: {command}', ['command' => $command]);
return $this->executeCommand($command);