Issue #2116375 by joelpittet: Replace module_exists with \Drupal::moduleHandler()->moduleExists.