You are here

public function InstallableLibrary::getLatestVersion in Markdown 8.2

Retrieves the latest version based on available versions.

Note: this will likely make an HTTP request.

Parameters

string $minimumStability: Optional. The minimum stability to determine which latest version to retrieve.

Return value

string|void The latest version, if successful.

1 call to InstallableLibrary::getLatestVersion()
PeclExtension::getPackageInfo in src/Annotation/PeclExtension.php
Retrieves the package information for the PECL package.

File

src/Annotation/InstallableLibrary.php, line 154

Class

InstallableLibrary

Namespace

Drupal\markdown\Annotation

Code

public function getLatestVersion($minimumStability = 'stable') {
  if (!isset($this->latestVersion[$minimumStability])) {
    $this->latestVersion[$minimumStability] = Semver::latestVersion($this
      ->getNewerVersions($minimumStability), "@{$minimumStability}");
  }
  return $this->latestVersion[$minimumStability];
}