Commit 55165495 authored by Matthew Radcliffe's avatar Matthew Radcliffe Committed by Joël Pittet
Browse files

Issue #3202876 by eelkeblok, djassie, mradcliffe: Installation error:...

Issue #3202876 by eelkeblok, djassie, mradcliffe: Installation error: non-existent logger.channel.markdown
parent e3e780f8
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -56,6 +56,18 @@ function markdown_requirements($phase) {
      $containerNamespaces->offsetSet('Drupal\\markdown', str_replace(\Drupal::root() . '/', '', $src));
    }

    // Add services that are not available yet, but are required by the classes
    // above. The container rebuild after module installation should reset these
    // to what is defined in markdown.services.yml.
    if (!\Drupal::hasService('logger.channel.markdown')) {
      $markdownLogger = \Drupal::service('logger.factory')->get('markdown');
      \Drupal::getContainer()->set('logger.channel.markdown', $markdownLogger);
    }
    if (!\Drupal::hasService('cache.markdown')) {
      $markdownCache = \Drupal::service('cache_factory')->get('markdown');
      \Drupal::getContainer()->set('cache.markdown', $markdownCache);
    }

    $parserManager = ParserManager::create();
  }