function PluginManager::uninstallPackage
Uninstall a plugin package
If it's of type composer-installer it is unregistered from the installers instead for BC
Throws
\UnexpectedValueException
File
-
vendor/
composer/ composer/ src/ Composer/ Plugin/ PluginManager.php, line 337
Class
- PluginManager
- Plugin manager
Namespace
Composer\PluginCode
public function uninstallPackage(PackageInterface $package) : void {
if (!isset($this->registeredPlugins[$package->getName()])) {
return;
}
$plugin = $this->registeredPlugins[$package->getName()];
if ($plugin instanceof InstallerInterface) {
$this->deactivatePackage($package);
}
else {
unset($this->registeredPlugins[$package->getName()]);
$this->removePlugin($plugin);
$this->uninstallPlugin($plugin);
}
}