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

Breadcrumb

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

function VcsDriver::getComposerInformation

@inheritDoc

Overrides VcsDriverInterface::getComposerInformation

1 call to VcsDriver::getComposerInformation()
VcsDriver::hasComposerFile in vendor/composer/composer/src/Composer/Repository/Vcs/VcsDriver.php
@inheritDoc
4 methods override VcsDriver::getComposerInformation()
GitBitbucketDriver::getComposerInformation in vendor/composer/composer/src/Composer/Repository/Vcs/GitBitbucketDriver.php
@inheritDoc
GitHubDriver::getComposerInformation in vendor/composer/composer/src/Composer/Repository/Vcs/GitHubDriver.php
@inheritDoc
GitLabDriver::getComposerInformation in vendor/composer/composer/src/Composer/Repository/Vcs/GitLabDriver.php
@inheritDoc
SvnDriver::getComposerInformation in vendor/composer/composer/src/Composer/Repository/Vcs/SvnDriver.php
@inheritDoc

File

vendor/composer/composer/src/Composer/Repository/Vcs/VcsDriver.php, line 87

Class

VcsDriver
A driver implementation for driver with authentication interaction.

Namespace

Composer\Repository\Vcs

Code

public function getComposerInformation(string $identifier) : ?array {
    if (!isset($this->infoCache[$identifier])) {
        if ($this->shouldCache($identifier) && ($res = $this->cache
            ->read($identifier))) {
            return $this->infoCache[$identifier] = JsonFile::parseJson($res);
        }
        $composer = $this->getBaseComposerInformation($identifier);
        if ($this->shouldCache($identifier)) {
            $this->cache
                ->write($identifier, JsonFile::encode($composer, 0));
        }
        $this->infoCache[$identifier] = $composer;
    }
    return $this->infoCache[$identifier];
}
RSS feed
Powered by Drupal