Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PathDownloader.php

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\Downloader

Code

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();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal