You are here

protected function ProjectVersionClient::isLatestVersion in Acquia Content Hub 8.2

Checks whether the module's version is the latest.

Parameters

string $drupal_version: The drupal version.

string $major_version: The module's major version.

Return value

bool Returns TRUE if both versions are matching.

1 call to ProjectVersionClient::isLatestVersion()
ProjectVersionClient::parseXml in src/Client/ProjectVersionClient.php
Parses XML from D.O and get latest versions of security covered releases.

File

src/Client/ProjectVersionClient.php, line 161

Class

ProjectVersionClient
Project version client to get latest releases for a project from D.O.

Namespace

Drupal\acquia_contenthub\Client

Code

protected function isLatestVersion(string $drupal_version, string $major_version) : bool {
  return empty($drupal_version) || $drupal_version === $major_version && in_array($drupal_version, [
    '8',
    '9',
  ], TRUE);
}