fix(setupchecks): Skip checking for OPcache if running from CLI

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
This commit is contained in:
Git'Fellow 2024-07-08 10:43:20 +02:00 committed by backportbot[bot]
parent 31f1834a20
commit 1c0bf29a2d

View file

@ -131,6 +131,11 @@ class PhpOpcacheSetup implements ISetupCheck {
}
public function run(): SetupResult {
// Skip OPcache checks if running from CLI
if (PHP_SAPI === 'cli') {
return SetupResult::success($this->l10n->t('Checking from CLI, OPcache checks have been skipped.'));
}
[$level,$recommendations] = $this->getOpcacheSetupRecommendations();
if (!empty($recommendations)) {
return match($level) {