Change record status: 
Introduced in branch: 
3.1.x
Introduced in version: 
3.1.7
Description: 

Summary

Registration now uses the standard entity handler pattern.

The entity type id specified should be that of the entity to be wrapped as a host, not 'registration'. The handler should be 'registration_host_entity' not 'host_entity'.

This allows modules to provide alternative host entity handlers for entity types.

Before

$handler = \Drupal::entityTypeManager()->getHandler('registration', 'host_entity');
$host_entity = $handler->createHostEntity($entity);

After

$handler = \Drupal::entityTypeManager()->getHandler($entity->getEntityTypeId(), 'registration_host_entity');
$host_entity = $handler->createHostEntity($entity);
Impacts: 
Module developers