Change record status: 
Project: 
Introduced in branch: 
8.x
Introduced in version: 
8.0-alpha2-dev
Description: 

TypedDataInterface::getType() has been removed. Interface checks should instead be used or methods of a more specific interface.

Before

if ($typed_data->getType() == 'string') {
  // Do something.
}

if ($field->getType() == 'field_item:text_with_summary') {
  // Do something.
}

After

if ($typed_data instanceof \Drupal\Core\TypedData\Type\StringInterface {
  // Do something.
}

if ($field->getFieldDefinition()->getFieldType() == 'text_with_summary') {
  // Do something.
}

If you need to introspect types (and so you cannot use instanceof), see the 'type' key in $definition. The getPluginId() method can similarly be useful to get type information.

Impacts: 
Module developers