function PathDownloader::getInstallOperationAppendix
@inheritDoc
Overrides FileDownloader::getInstallOperationAppendix
1 call to PathDownloader::getInstallOperationAppendix()
- PathDownloader::install in vendor/
composer/ composer/ src/ Composer/ Downloader/ PathDownloader.php - @inheritDoc
File
-
vendor/
composer/ composer/ src/ Composer/ Downloader/ PathDownloader.php, line 242
Class
- PathDownloader
- Download a package from a local path.
Namespace
Composer\DownloaderCode
protected function getInstallOperationAppendix(PackageInterface $package, string $path) : string {
$url = $package->getDistUrl();
if (null === $url) {
throw new \RuntimeException('The package ' . $package->getPrettyName() . ' has no dist url configured, cannot install.');
}
$realUrl = realpath($url);
if (false === $realUrl) {
throw new \RuntimeException('Failed to realpath ' . $url);
}
if (realpath($path) === $realUrl) {
return ': Source already present';
}
[
$currentStrategy,
] = $this->computeAllowedStrategies($package->getTransportOptions());
if ($currentStrategy === self::STRATEGY_SYMLINK) {
if (Platform::isWindows()) {
return ': Junctioning from ' . $package->getDistUrl();
}
return ': Symlinking from ' . $package->getDistUrl();
}
return ': Mirroring from ' . $package->getDistUrl();
}