function NoopInstaller::update
@inheritDoc
Overrides InstallerInterface::update
File
-
vendor/
composer/ composer/ src/ Composer/ Installer/ NoopInstaller.php, line 82
Class
- NoopInstaller
- Does not install anything but marks packages installed in the repo
Namespace
Composer\InstallerCode
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target) {
if (!$repo->hasPackage($initial)) {
throw new \InvalidArgumentException('Package is not installed: ' . $initial);
}
$repo->removePackage($initial);
if (!$repo->hasPackage($target)) {
$repo->addPackage(clone $target);
}
return \React\Promise\resolve(null);
}