Skip to content
Snippets Groups Projects

Issue #3232420: Create a service which can recommend a target version of core

Merged Issue #3232420: Create a service which can recommend a target version of core
All threads resolved!
All threads resolved!
1 file
+ 7
1
Compare changes
  • Side-by-side
  • Inline
+ 7
1
@@ -20,6 +20,12 @@ class UpdateRecommender {
* @return \Drupal\automatic_updates_9_3_shim\ProjectRelease|null
* A value object with information about the recommended release, or NULL
* if Drupal core is already up-to-date.
*
* @throws \RuntimeException
* If data about available updates cannot be retrieved.
* @throws \LogicException
* If Drupal core is out of date and the recommended version of cannot be
* determined.
*/
public function getRecommendedRelease(array &$project): ?ProjectRelease {
$available_updates = update_get_available(TRUE);
@@ -36,7 +42,7 @@ class UpdateRecommender {
}
// If we don't know what to recommend they update to, time to freak out.
elseif (empty($project['recommended'])) {
throw new \LogicException('Could not determine the recommended version of Drupal core.');
throw new \LogicException('Drupal core is out of date, but the recommended version could not be determined.');
}
$recommended_version = $project['recommended'];
Loading