public function Installer::uninstall in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/composer/installers/src/Composer/Installers/Installer.php \Composer\Installers\Installer::uninstall()
File
- vendor/
composer/ installers/ src/ Composer/ Installers/ Installer.php, line 93
Class
Namespace
Composer\InstallersCode
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package) {
if (!$repo
->hasPackage($package)) {
throw new \InvalidArgumentException('Package is not installed: ' . $package);
}
$repo
->removePackage($package);
$installPath = $this
->getInstallPath($package);
$this->io
->write(sprintf('Deleting %s - %s', $installPath, $this->filesystem
->removeDirectory($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
}