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());
 }
 public function update(RepositoryInterface $repo, UpdateOperation $operation)
 {
     $initial = $operation->getInitialPackage();
     $target = $operation->getTargetPackage();
     $initialType = $initial->getType();
     $targetType = $target->getType();
     if ($initialType === $targetType) {
         $installer = $this->getInstaller($initialType);
         $installer->update($repo, $initial, $target);
         $this->markForNotification($target);
     } else {
         $this->getInstaller($initialType)->uninstall($repo, $initial);
         $this->getInstaller($targetType)->install($repo, $target);
     }
 }
 /**
  * Executes update operation.
  *
  * @param   InstallOperation    $operation  operation instance
  */
 public function update(UpdateOperation $operation)
 {
     $initial = $operation->getInitialPackage();
     if ($initial instanceof AliasPackage) {
         $initial = $initial->getAliasOf();
     }
     $target = $operation->getTargetPackage();
     if ($target instanceof AliasPackage) {
         $target = $target->getAliasOf();
         $target->setInstalledAsAlias(true);
     }
     $initialType = $initial->getType();
     $targetType = $target->getType();
     if ($initialType === $targetType) {
         $installer = $this->getInstaller($initialType);
         $installer->update($initial, $target);
     } else {
         $this->getInstaller($initialType)->uninstall($initial);
         $this->getInstaller($targetType)->install($target);
     }
 }
 public function onUpdate(UpdateOperation $operation, &$postinstall_queue)
 {
     $package = $operation->getTargetPackage();
     $app_code = $this->getApplicationCode($package);
     //$this->runPhing($app_code, 'upgrade');
     $postinstall_queue[] = ['upgrade', $app_code];
 }
Example #5
0
 /**
  * Executes update operation.
  *
  * @param   InstallOperation    $operation  operation instance
  */
 public function update(UpdateOperation $operation)
 {
     $initial = $operation->getInitialPackage();
     $target = $operation->getTargetPackage();
     $initialType = $initial->getType();
     $targetType = $target->getType();
     if ($initialType === $targetType) {
         $installer = $this->getInstaller($initialType);
         $installer->update($initial, $target);
     } else {
         $this->getInstaller($initialType)->uninstall($initial);
         $this->getInstaller($targetType)->install($target);
     }
 }