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

Due to changes in #2099131: Use #pre_render pattern for entity render caching, the signatures of the following hooks have changed:

  • hook_ENTITY_TYPE_view
  • hook_entity_view

Before

function hook_entity_view(\Drupal\Core\Entity\Entity $entity, \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display, $view_mode, $langcode) {}

After

function hook_entity_view(array &$build, \Drupal\Core\Entity\Entity $entity, \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display, $view_mode, $langcode) {}

For further details in specific entity API files, see

Impacts: 
Module developers
Themers