fix: expand PHP extension checks (#22)
Generic: Repo Health / Access control (push) Successful in 1s
Generic: Repo Health / Site Health (push) Has been skipped
Universal: Auto Version Bump / Version Bump (push) Successful in 4s
Generic: Project CI / Lint & Validate (push) Successful in 8s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 5s
Generic: Project CI / Tests (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Generic: Repo Health / Access control (push) Successful in 1s
Generic: Repo Health / Site Health (push) Has been skipped
Universal: Auto Version Bump / Version Bump (push) Successful in 4s
Generic: Project CI / Lint & Validate (push) Successful in 8s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 5s
Generic: Project CI / Tests (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
BackupEngine: check ext-zip, ext-pdo, ext-pdo_mysql, ext-mbstring before running (was only zip + mbstring). Installer preflight: warn about missing extensions (zip, pdo, pdo_mysql, mbstring, curl) during install/update. Warns but does not block installation so the component can still be configured. MokoRestore already checks ext-zip, ext-pdo_mysql, ext-mbstring, ext-json in its preflight step. composer.json already declares all six extensions as requirements (zip, pdo, pdo_mysql, curl, ftp, mbstring) — composer install fails if any are missing, which CI enforces. Closes #22
This commit is contained in:
@@ -58,6 +58,19 @@ class Pkg_MokoSuiteBackupInstallerScript
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check required PHP extensions (warn but don't block install)
|
||||
$requiredExts = ['zip', 'pdo', 'pdo_mysql', 'mbstring', 'curl'];
|
||||
$missingExts = array_filter($requiredExts, fn($ext) => !extension_loaded($ext));
|
||||
|
||||
if (!empty($missingExts)) {
|
||||
Factory::getApplication()->enqueueMessage(
|
||||
'<strong>MokoSuiteBackup — Missing PHP Extensions</strong>: '
|
||||
. implode(', ', array_map(fn($e) => 'ext-' . $e, $missingExts))
|
||||
. '. Some features (backup, restore, remote upload, notifications) may not work until these are enabled.',
|
||||
'warning'
|
||||
);
|
||||
}
|
||||
|
||||
// Save download key before Joomla re-registers the update site
|
||||
if ($type === 'update') {
|
||||
$this->preflight_saveKey();
|
||||
|
||||
Reference in New Issue
Block a user