diff -u b/core/modules/update/src/Controller/UpdateController.php b/core/modules/update/src/Controller/UpdateController.php --- b/core/modules/update/src/Controller/UpdateController.php +++ b/core/modules/update/src/Controller/UpdateController.php @@ -4,6 +4,7 @@ use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Render\RendererInterface; +use Drupal\Core\Url; use Drupal\update\UpdateFetcherInterface; use Drupal\update\UpdateManagerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -86,8 +87,7 @@ ], ], ]; - // @todo DI for these services, too. - if (\Drupal::service('module_handler')->moduleExists('dblog') && \Drupal::currentUser()->hasPermission('access site reports')) { + if ($this->moduleHandler()->moduleExists('dblog') && $this->currentUser()->hasPermission('access site reports')) { $options = ['query' => ['type' => ['update']]]; $watchdog_url = Url::fromRoute('dblog.overview', [], $options); $message['items']['#items'][] = $this->t('Check your local system logs for additional error messages.', ['@url' => $watchdog_url->toString()]);