Пример #1
0
 public function install(RepositoryInterface $repo, InstallOperation $operation)
 {
     $package = $operation->getPackage();
     $installer = $this->getInstaller($package->getType());
     $installer->install($repo, $package);
     $this->markForNotification($package);
 }
Пример #2
0
 /**
  * @param string $composerType
  *
  * @return PackageEvent
  */
 protected function createEvent($composerType)
 {
     $this->package->expects($this->any())->method('getType')->will($this->returnValue($composerType));
     $this->operation->expects($this->any())->method('getTargetPackage')->will($this->returnValue($this->package));
     $this->operation->expects($this->any())->method('getPackage')->will($this->returnValue($this->package));
     return new PackageEvent('foo-event', $this->composer, $this->io, true, $this->operation);
 }
Пример #3
0
 /**
  * @param string $composerType
  *
  * @return PackageEvent
  */
 protected function createEvent($composerType)
 {
     $this->package->expects($this->any())->method('getType')->will($this->returnValue($composerType));
     $this->operation->expects($this->any())->method('getTargetPackage')->will($this->returnValue($this->package));
     $this->operation->expects($this->any())->method('getPackage')->will($this->returnValue($this->package));
     /* @var PolicyInterface $policy */
     $policy = $this->getMock('Composer\\DependencyResolver\\PolicyInterface');
     /* @var Pool $pool */
     $pool = $this->getMockBuilder('Composer\\DependencyResolver\\Pool')->disableOriginalConstructor()->getMock();
     /* @var CompositeRepository $installedRepo */
     $installedRepo = $this->getMockBuilder('Composer\\Repository\\CompositeRepository')->disableOriginalConstructor()->getMock();
     /* @var Request $request */
     $request = $this->getMockBuilder('Composer\\DependencyResolver\\Request')->disableOriginalConstructor()->getMock();
     $operations = array($this->getMock('Composer\\DependencyResolver\\Operation\\OperationInterface'));
     return new PackageEvent('foo-event', $this->composer, $this->io, true, $policy, $pool, $installedRepo, $request, $operations, $this->operation);
 }
Пример #4
0
 /**
  * Executes install operation.
  *
  * @param   InstallOperation    $operation  operation instance
  */
 public function install(InstallOperation $operation)
 {
     $package = $operation->getPackage();
     if ($package instanceof AliasPackage) {
         $package = $package->getAliasOf();
         $package->setInstalledAsAlias(true);
     }
     $installer = $this->getInstaller($package->getType());
     $installer->install($package);
 }
Пример #5
0
 /**
  * Executes install operation.
  *
  * @param   RepositoryInterface $repo       repository in which to check
  * @param   InstallOperation    $operation  operation instance
  */
 public function install(RepositoryInterface $repo, InstallOperation $operation)
 {
     $package = $operation->getPackage();
     if ($package instanceof AliasPackage) {
         $package = $package->getAliasOf();
         $package->setInstalledAsAlias(true);
     }
     $installer = $this->getInstaller($package->getType());
     $installer->install($repo, $package);
     $this->notifyInstall($package);
 }
 public function install(RepositoryInterface $repo, InstallOperation $operation)
 {
     $this->installed[] = $operation->getPackage();
     $this->trace[] = (string) $operation;
     $repo->addPackage(clone $operation->getPackage());
 }
 public function onInstall(InstallOperation $operation, &$postinstall_queue)
 {
     $package = $operation->getPackage();
     $app_code = $this->getApplicationCode($package);
     $postinstall_queue[] = ['install', $app_code];
 }
Пример #8
0
 /**
  * Executes install operation.
  *
  * @param   InstallOperation    $operation  operation instance
  */
 public function install(InstallOperation $operation)
 {
     $installer = $this->getInstaller($operation->getPackage()->getType());
     $installer->install($operation->getPackage());
 }
Пример #9
0
 /**
  * {@inheritDoc}
  */
 public function install(RepositoryInterface $repo, InstallOperation $operation)
 {
     $this->packageInformation->set($this->packageInformation->escape($operation->getPackage()->getPrettyName()), ['type' => 'install', 'reason' => $this->getReason($operation), 'package' => $this->dumper->dump($operation->getPackage())]);
     parent::install($repo, $operation);
 }