Composer\Installers
Installer::uninstall() public WC 1.0
{} Это метод класса: Installer{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$Installer = new Installer(); $Installer->uninstall( $repo, $package );
- $repo(InstalledRepositoryчислоerface) (обязательный)
- -
- $package(Packageчислоerface) (обязательный)
- -
Код Installer::uninstall() Installer::uninstall WC 5.0.0
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
{
$installPath = $this->getPackageBasePath($package);
$io = $this->io;
$outputStatus = function () use ($io, $installPath) {
$io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
};
$promise = parent::uninstall($repo, $package);
// Composer v2 might return a promise here
if ($promise instanceof PromiseInterface) {
return $promise->then($outputStatus);
}
// If not, execute the code right away as parent::uninstall executed synchronously (composer v1, or v2 without async)
$outputStatus();
return null;
}