Issue #3254755: Add method to UpdateRecommender to recommend release during cron.
1 unresolved thread
Compare changes
Conflict: This file was modified in the source branch, but removed in the target branch.
Ask someone with write access to resolve it.
+ 44
− 0
@@ -3,6 +3,7 @@
@@ -66,4 +67,47 @@ class UpdateRecommender {
I chatted with @kunal.sachdev and he had the idea to just put the logic in the existing
getRecommendedRelease()
. We could add a constructor to this class to pass an optional parameter for $stage. If it is a CronUpdater would have slightly different logic.We would have to check if
$project['recommended']
was the next patch release. Then we would loop through$project['security updates']
and check if any of those were the next patch release.Actually this logic may be useful for the form case to. We could evaluate
$project['recommended']
and all$project['security updates']
version. If we had private functionUpdateVersionValidator::isUpdateVersionSupported()
then that function could check if cron updater was being used. Then our logic ingetRecommendedRelease()
would not have to consider cron.That would probably mean that
UpdateVersionValidator::isUpdateVersionSupported()
would duplicate a lot of logic in\Drupal\automatic_updates\Validator\UpdateVersionValidator::checkUpdateVersion
because that method also has to determine if a version is supported for an update depending on whether you are using the cronupdater or not.To avoid this we could add
public static function validateUpdateVersion(string $from_version_string, string $to_version_string, Updater $updater): ?ValidationResult
Then in we won't needUpdateVersionValidator::isUpdateVersionSupported()
because ingetRecommendedRelease()
we couldand then the same for all the security releases