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