You are here

public function OpcodeCache::run in Automatic Updates 8

Run check.

Return value

array An array of translatable strings.

Overrides ReadinessCheckerInterface::run

File

src/ReadinessChecker/OpcodeCache.php, line 16

Class

OpcodeCache
Error if opcode caching is enabled and updates are executed via CLI.

Namespace

Drupal\automatic_updates\ReadinessChecker

Code

public function run() {
  $messages = [];
  if ($this
    ->isCli() && $this
    ->hasOpcodeFileCache()) {
    $messages[] = $this
      ->t('Automatic updates cannot run via CLI  when opcode file cache is enabled.');
  }
  return $messages;
}