Change record status: 
Project: 
Introduced in branch: 
9.2.x
Introduced in version: 
9.2.0
Description: 

Introduced swappable HistoryRepository service (history.repository) allows more implementations in contrib modules for different needs implementing a HistoryRepositoryInterface.

Early the history module was limited to store a last view timestamp for node entities only.

Deprecated functions:
history_read($nid) and history_read_multiple($nids) - HistoryRepositoryInterface::getLastViewed($entity_type, $entity_ids, AccountInterface $account)

history_write($nid, AccountInterface $account = NULL) - updateLastViewed(EntityInterface $entity, AccountInterface $account)

  $account = \Drupal::currentUser();
  $history = $this->historyRepository->getLastViewed('node', array($node->id()), $account);
  return $history[$nide->id()];
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