Two modules trying to extend NodeForm I have two modules that both extend NodeForm the usual way:

function MY_MODULE_entity_type_alter(array &amp;$entity_info) {
  $entity_info['node']-&gt;setFormClass('default', 'Drupal\MY_MODULE\Form\MyModuleNodeForm');
  $entity_info['node']-&gt;setFormClass('edit', 'Drupal\MY_MODULE\Form\MyModuleNodeForm');
}


As far as I can tell (both from actually looking into what setFormClass() does and simply trying out) this is a race condition that only one of them can win. Although they both want to deal with different content types and what they do would not conflict at all, they can't coexist. With the old, 7-style alter and submit functions, this could be solved but what would be the proper 8-ish way to do it? Both modules are mine, I can combine them if necessary but that wouldn't be really elegant.
You have two options. Either go back to using _form_alter() hooks to handle it, or you can extend twice:

module 1 node for extends module 2 node form which extends node form. Then make sure to call the parent::validateForm and parent::submitForm from your validate and submit handlers.