Skip to content

Commit

Permalink
Make sure double digit version also populate the advisories
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Jan 17, 2024
1 parent fede875 commit b1a9ce9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/CosyComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,8 @@ protected function attachDrupalAdvisories(array &$alerts)
$drupal = $data->getPackageData('drupal/core');
// Now see if a newer version is available, and if it is a security update.
$endpoint = 'current';
$major_version = mb_substr($drupal->version, 0, 1);
$version_parts = explode('.', $drupal->version);
$major_version = $version_parts[0];
switch ($major_version) {
case '8':
$endpoint = '8.x';
Expand All @@ -1987,9 +1988,11 @@ protected function attachDrupalAdvisories(array &$alerts)
$endpoint = '7.x';
break;

case '10':
case '9':
// Using current.
break;

default:
throw new \Exception('No idea what endpoint to use to check for drupal security release');
}
Expand Down

0 comments on commit b1a9ce9

Please sign in to comment.