public function update(RepositoryInterface $repo, UpdateOperation $operation)
 {
     $this->updated[] = array($operation->getInitialPackage(), $operation->getTargetPackage());
     $this->trace[] = (string) $operation;
     $repo->removePackage($operation->getInitialPackage());
     $repo->addPackage(clone $operation->getTargetPackage());
 }
Ejemplo n.º 2
0
    public function markAliasInstalled(RepositoryInterface $repo, MarkAliasInstalledOperation $operation)
    {
        $package = $operation->getPackage();

        $this->installed[] = $package;
        $this->trace[] = (string) $operation;

        if (!$repo->hasPackage($package)) {
            $repo->addPackage($package);
        }
    }
Ejemplo n.º 3
0
 /**
  * Executes markAliasInstalled operation.
  *
  * @param RepositoryInterface         $repo      repository in which to check
  * @param MarkAliasInstalledOperation $operation operation instance
  */
 public function markAliasInstalled(RepositoryInterface $repo, MarkAliasInstalledOperation $operation)
 {
     $package = $operation->getPackage();
     if (!$repo->hasPackage($package)) {
         $repo->addPackage(clone $package);
     }
 }
Ejemplo n.º 4
0
 public function markAliasInstalled(RepositoryInterface $repo, MarkAliasInstalledOperation $operation)
 {
     $this->installed[] = $operation->getPackage();
     $this->trace[] = (string) $operation;
     $repo->addPackage(clone $operation->getPackage());
 }