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

The available country list provided by country_get_list() can now be obtained through the service container:

D7

<?php
 
require_once DRUPAL_ROOT . '/includes/iso.inc';
 
$countries = country_get_list();
?>

D8

<?php
  $countries
= Drupal::service('country_manager')->getList();
?>

This obsoletes https://drupal.org/node/1276626.

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