Ejemplo n.º 1
0
 /**
  * Create a product branch
  *
  * This command creates a new product branch.
  *
  * @param string $productName The product name
  * @param string $version The branch version, for example "1.3"
  * @param string $phpVersions The supported PHP versions
  * @param string $mysqlVersions The supported MySQL versions
  * @param string $gitUrl The git URL pointing to HEAD
  * @return void
  */
 public function createBranchCommand($productName, $version, $phpVersions, $mysqlVersions, $gitUrl)
 {
     $product = $this->productRepository->findOneByName($productName);
     if ($product === NULL) {
         $this->outputLine('Product "%s" does not exist.', array($productName));
         $this->quit(1);
     }
     $branch = new Branch($product, $version);
     $branch->setPhpVersions($phpVersions);
     $branch->setMysqlVersions($mysqlVersions);
     $branch->setGitUrl($gitUrl);
     $this->productRepository->update($product);
     $this->outputLine('Created new product branch "%s %s".', array($productName, $version));
 }
Ejemplo n.º 2
0
 /**
  * Adds a product branch
  *
  * @param Branch $branch
  * @return void
  */
 public function addBranch(Branch $branch)
 {
     $this->branches[$branch->getVersion()] = $branch;
 }