/** * @param InstalledPackage[] $packagesToRemove */ public function doRemoves(array $packagesToRemove) { foreach ($packagesToRemove as $remove) { $this->eventManager->dispatch(new PackageUnInstallEvent('pre-package-uninstall', $remove)); $this->unInstallStrategy->unInstall($remove->getInstalledFiles()); $this->eventManager->dispatch(new PackageUnInstallEvent('post-package-uninstall', $remove)); $this->installedPackageRepository->remove($remove); } }
/** * Deploy all the queued packages */ public function doDeploy() { $this->sortPackages(); /** @var Entry $package */ foreach ($this->packages as $package) { $this->eventManager->dispatch(new PackageDeployEvent('pre-package-deploy', $package)); $package->getDeployStrategy()->deploy(); $this->eventManager->dispatch(new PackageDeployEvent('post-package-deploy', $package)); } }