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

Only the names have changed; both the function and the hook are functionally identical to their Drupal 7 versions.

Example:

// Drupal 7
$username = format_username($user);

/**
 * Implements hook_username_alter().
 */
function MYMODULE_username_alter(&$name, $account) {
  // Do whatever.
}

// Drupal 8
$username = user_format_name($user);

/**
 * Implements hook_user_format_name_alter().
 */
function MYMODULE_user_format_name_alter(&$name, $account) {
  // Do exactly the same thing here.
}
Impacts: 
Module developers
Themers