You are here

function monolog_requirements in Monolog 8

Same name and namespace in other branches
  1. 7 monolog.install \monolog_requirements()
  2. 2.x monolog.install \monolog_requirements()

Implements hook_requirements().

File

./monolog.install, line 11
Install, update, and uninstall functions for the Monolog module.

Code

function monolog_requirements($phase) {
  $requirements = [];
  if ($phase == 'install') {
    if (!class_exists('\\Monolog\\Logger')) {
      $requirements['monolog_library'] = [
        'description' => t('The Monolog module requires the monolog/monolog library. Make sure the Monolog package is installed via Composer.'),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
  }
  return $requirements;
}