You are here

public static function Semver::isValid in Markdown 8.2

Indicates whether a version is valid.

Parameters

string $version: The version to test.

Return value

bool TRUE or FALSE

1 call to Semver::isValid()
InstallablePluginManager::processLibraryDefinition in src/PluginManager/InstallablePluginManager.php
Processes the library definition.

File

src/Util/Semver.php, line 47

Class

Semver
Extends the base Composer SemVer class with additional functionality.

Namespace

Drupal\markdown\Util

Code

public static function isValid($version) {
  try {
    return !!static::versionParser()
      ->normalize($version);
  } catch (\UnexpectedValueException $exception) {

    // Intentionally do nothing.
  }
  return FALSE;
}