/**
  * @param PackageEvent $event
  */
 public function onDisablePackage(PackageEvent $event)
 {
     $package = $event->getPackage();
     if ($package->getRemote()->getAdapter() !== 'GitLab') {
         return;
     }
     $this->adapter->disableHook($package);
 }
Exemple #2
0
 /**
  * @param PackageEvent $event
  */
 public function onCreatePackage(PackageEvent $event)
 {
     $package = $event->getPackage();
     $config = $this->entityManager->getRepository('Terramar\\Packages\\Plugin\\Satis\\PackageConfiguration')->findOneBy(array('package' => $package));
     if (!$config) {
         $config = new PackageConfiguration();
         $config->setPackage($package);
     }
     $this->entityManager->persist($config);
 }
 public function testGetPackage()
 {
     $this->assertSame($this->package, $this->sut->getPackage());
 }