/** * {@inheritDoc} */ public function uninstall(WritableRepositoryInterface $repo, PackageInterface $package) { if (!$repo->hasPackage($package)) { // TODO throw exception again here, when update is fixed and we don't have to remove+install (see #125) return; throw new \InvalidArgumentException('Package is not installed: ' . $package); } $repo->removePackage($package); }
/** * {@inheritDoc} */ public function uninstall(WritableRepositoryInterface $repo, PackageInterface $package) { if (!$repo->hasPackage($package)) { // TODO throw exception again here, when update is fixed and we don't have to remove+install (see #125) return; throw new \InvalidArgumentException('Package is not installed: ' . $package); } $downloadPath = $this->getInstallPath($package); $this->downloadManager->remove($package, $downloadPath); $this->removeBinaries($package); $repo->removePackage($package); }