Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ protected function getOpcacheSetupRecommendations(): array {
}

public function run(): SetupResult {
// Skip OPcache checks if running from CLI
if (\OC::$CLI && !$this->iniGetWrapper->getBool('opcache.enable_cli')) {
return SetupResult::success($this->l10n->t('Checking from CLI, OPcache checks have been skipped.'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return SetupResult::success($this->l10n->t('Checking from CLI, OPcache checks have been skipped.'));
return SetupResult::info($this->l10n->t('This check is skipped because OPcache is turned off.'));

Copy link
Member

@MichaIng MichaIng Jul 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure in how far the output style of info differs from success, but I would indeed rate it as success when OPcache is disabled for CLI, since this is recommended for production systems. And in any case, the text should keep the info that it is skipped because we are running from CLI, or "turned off for CLI", else the information can be confusing.

}

[$level,$recommendations] = $this->getOpcacheSetupRecommendations();
if (!empty($recommendations)) {
return match($level) {
Expand Down