By acbramley on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.3.x
Introduced in version:
11.3.0
Issue links:
Description:
Form handlers that are defined in an entity type's definition and used in route definitions with the _entity_form default must implement Drupal\Core\Entity\EntityFormInterface.
Previously, if a form handler was used in an _entity_form route definition and didn't extend EntityForm, an obscure error was reported because Drupal\Core\Entity\EntityTypeManager::getFormObject calls several methods on the form object defined by EntityFormInterface.
It is recommended to extend \Drupal\Core\Entity\EntityForm in your form handler classes.
Impacts:
Module developers