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

Breadcrumb

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

function VcsDownloader::getVcsReference

@inheritDoc

Overrides VcsCapableDownloaderInterface::getVcsReference

File

vendor/composer/composer/src/Composer/Downloader/VcsDownloader.php, line 241

Class

VcsDownloader
@author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Composer\Downloader

Code

public function getVcsReference(PackageInterface $package, string $path) : ?string {
    $parser = new VersionParser();
    $guesser = new VersionGuesser($this->config, $this->process, $parser, $this->io);
    $dumper = new ArrayDumper();
    $packageConfig = $dumper->dump($package);
    if ($packageVersion = $guesser->guessVersion($packageConfig, $path)) {
        return $packageVersion['commit'];
    }
    return null;
}

API Navigation

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