more updates

Signed-off-by: Andy Miller <rhuk@mac.com>
This commit is contained in:
Andy Miller
2025-10-16 13:49:53 -06:00
parent a4e0c83160
commit 6ff2c4576c
4 changed files with 128 additions and 31 deletions

View File

@@ -243,10 +243,13 @@ class SafeUpgradeManager
return $this->errorResult('Unable to locate Grav update package information.');
}
$this->recovery->markUpgradeWindow('core-upgrade', [
'scope' => 'core',
'target_version' => $remoteVersion,
]);
if ($this->recovery && method_exists($this->recovery, 'markUpgradeWindow')) {
// Newer Grav exposes upgrade window helpers; guard for older cores.
$this->recovery->markUpgradeWindow('core-upgrade', [
'scope' => 'core',
'target_version' => $remoteVersion,
]);
}
try {
$file = $this->download($package, $timeout);
@@ -265,7 +268,9 @@ class SafeUpgradeManager
$this->setProgress('finalizing', 'Finalizing upgrade...', 100);
$safeUpgrade->clearRecoveryFlag();
$this->recovery->closeUpgradeWindow();
if ($this->recovery && method_exists($this->recovery, 'closeUpgradeWindow')) {
$this->recovery->closeUpgradeWindow();
}
$manifest = $this->resolveLatestManifest();