The problem seems to be that in file core/modules/field_ui/field_ui.module
,
The $form['field_storage']['subform']
doesn't seem to exist, in the function below.
I don't know what the correct solution would be.. I'd say the form still needs to be alterable, and we still need to trigger the alter hooks on the bottom.
/**
* Implements hook_form_FORM_ID_alter() for field_config_edit_form.
*/
function field_ui_form_field_config_edit_form_alter(&$form, FormStateInterface $form_state) {
$field_config = $form_state->getFormObject()->getEntity();
assert($field_config instanceof FieldConfigInterface);
$form_id = 'field_storage_config_edit_form';
$hook = 'form_' . $form_id;
$field_storage_form = \Drupal::entityTypeManager()->getFormObject('field_storage_config', $form_state->getFormObject()->getOperation());
$field_storage_form->setEntity($field_config->getFieldStorageDefinition());
$subform_state = SubformState::createForSubform($form['field_storage']['subform'], $form, $form_state, $field_storage_form);
\Drupal::moduleHandler()->alterDeprecated('Use hook_form_field_config_edit_form_alter() instead. See https://www.drupal.org/node/3386675.', $hook, $form['field_storage']['subform'], $subform_state, $form_id);
\Drupal::theme()->alter($hook, $form['field_storage']['subform'], $subform_state, $form_id);
}