function LegacyVersionUtility::isLegacyVersion

Determines if a version is legacy.

Parameters

string $version: The version number.

Return value

bool TRUE if the version is a legacy version number, otherwise FALSE.

2 calls to LegacyVersionUtility::isLegacyVersion()
LegacyVersionUtility::convertToLegacyVersion in core/modules/package_manager/src/LegacyVersionUtility.php
Converts a version number to a legacy version if needed and possible.
LegacyVersionUtility::convertToSemanticVersion in core/modules/package_manager/src/LegacyVersionUtility.php
Converts a version number to a semantic version if needed.

File

core/modules/package_manager/src/LegacyVersionUtility.php, line 79

Class

LegacyVersionUtility
A utility class for dealing with legacy version numbers.

Namespace

Drupal\package_manager

Code

private static function isLegacyVersion(string $version) : bool {
    return stripos($version, '8.x-') === 0;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.