aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/lib/SetupChecks/PhpModules.php
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-01-16 10:03:22 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-03-18 11:10:13 +0100
commitb2cc51cf32b775867d53a5d477f319c62e06a6e7 (patch)
tree196b1db83effc756b978a7608345790befa1a8e2 /apps/settings/lib/SetupChecks/PhpModules.php
parentb31d51639d752d4a41184568b6fde50711c442d5 (diff)
downloadnextcloud-server-b2cc51cf32b775867d53a5d477f319c62e06a6e7.tar.gz
nextcloud-server-b2cc51cf32b775867d53a5d477f319c62e06a6e7.zip
Merge gmp and bcmath module checks with the existing PHP modules setup check
Also add description for why each module is recommended Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/settings/lib/SetupChecks/PhpModules.php')
-rw-r--r--apps/settings/lib/SetupChecks/PhpModules.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/apps/settings/lib/SetupChecks/PhpModules.php b/apps/settings/lib/SetupChecks/PhpModules.php
index bacf70eb9c9..e1084d68d5a 100644
--- a/apps/settings/lib/SetupChecks/PhpModules.php
+++ b/apps/settings/lib/SetupChecks/PhpModules.php
@@ -69,6 +69,18 @@ class PhpModules implements ISetupCheck {
return 'php';
}
+ protected function getRecommendedModuleDescription(string $module): string {
+ return match($module) {
+ 'bz2' => $this->l10n->t('required for extraction of apps compressed as bz2'),
+ 'intl' => $this->l10n->t('increases language translation performance and fixes sorting of non-ASCII characters'),
+ 'sodium' => $this->l10n->t('for Argon2 for password hashing'),
+ 'bcmath' => $this->l10n->t('for WebAuthn passwordless login'),
+ 'gmp' => $this->l10n->t('for WebAuthn passwordless login, and SFTP storage'),
+ 'exif' => $this->l10n->t('for image rotation in pictures app'),
+ default => '',
+ };
+ }
+
public function run(): SetupResult {
$missingRecommendedModules = $this->getMissingModules(self::RECOMMENDED_MODULES);
$missingRequiredModules = $this->getMissingModules(self::REQUIRED_MODULES);
@@ -78,8 +90,15 @@ class PhpModules implements ISetupCheck {
$this->urlGenerator->linkToDocs('admin-php-modules')
);
} elseif (!empty($missingRecommendedModules)) {
+ $moduleList = implode(
+ "\n",
+ array_map(
+ fn (string $module) => '- '.$module.' '.$this->getRecommendedModuleDescription($module),
+ $missingRecommendedModules
+ )
+ );
return SetupResult::info(
- $this->l10n->t('This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them: %s.', implode(', ', $missingRecommendedModules)),
+ $this->l10n->t("This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them:\n%s", $moduleList),
$this->urlGenerator->linkToDocs('admin-php-modules')
);
} else {