function VcsDownloader::prepare
@inheritDoc
Overrides DownloaderInterface::prepare
File
-
vendor/
composer/ composer/ src/ Composer/ Downloader/ VcsDownloader.php, line 96
Class
- VcsDownloader
- @author Jordi Boggiano <j.boggiano@seld.be>
Namespace
Composer\DownloaderCode
public function prepare(string $type, PackageInterface $package, string $path, ?PackageInterface $prevPackage = null) : PromiseInterface {
if ($type === 'update') {
$this->cleanChanges($prevPackage, $path, true);
$this->hasCleanedChanges[$prevPackage->getUniqueName()] = true;
}
elseif ($type === 'install') {
$this->filesystem
->emptyDirectory($path);
}
elseif ($type === 'uninstall') {
$this->cleanChanges($package, $path, false);
}
return \React\Promise\resolve(null);
}