src/main/php/de/codenamephp/build/task/CreateProjectByComposerPrototype.php
public function execute(string $projectFolder, string $prototype, string $prototypeVersion = '') {
    $projectPath = implode(DIRECTORY_SEPARATOR, [rtrim($this->getBaseFolder(), '\/'), ltrim($projectFolder, '\/')]);
    $createProjectCommand = $this->getCommandBuilder()->reset()
        ->addParam('create-project')
        ->addParam($prototype)
        ->addParam($projectPath)
        ->addParam($prototypeVersion)
        ->addArgument('keep-vcs')
        ->addArgument('no-dev');

    $this->getShell()->setDirectory($projectPath)->run($createProjectCommand);
  }
public function execute(string $projectFolder, string $prototype, string $prototypeVersion = '') {
    $projectPath = implode(DIRECTORY_SEPARATOR, [rtrim($this->getBaseFolder(), '\/'), ltrim($projectFolder, '\/')]);
    $createProjectCommand = $this->getCommandBuilder()->reset()
        ->addParam('create-project')
        ->addParam($prototype)
        ->addParam($projectPath)
        ->addParam($prototypeVersion)
        ->addArgument('keep-vcs')
        ->addArgument('no-dev');

    $this->getShell()->setDirectory($projectPath)->run($createProjectCommand);
  }
Gets the projectName, baseFolder and prototype from the AnswerCollector, builds the base folder from "{baseFolder}/{projectName}" and builds a cli command for composer
that is run with the shell in the base folder:

composer create-project {prototype} {projectFolder} dev-master --keep-vcs

@param string $projectFolder The folder the project will be created in, relative to the configured base path
@param string $prototype The prototype that will be used to create the project
@param string $prototypeVersion The version constraint that will be used to get the prototype