Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

Under special circumstances like the installer and early bootstrap, not all services can be used.
Previously the container was consulted directly, now there is a helper function on the \Drupal class.

// Before
if (!\Drupal::getContainer()->has('request')) {
  // Something not using the request.
}
// After
if (!\Drupal::hasService('request')) {
  // Something not using the request.
}
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done