Problem/Motivation
Follow-up #3112256: Let StringFormatter support UUID field type explicitly, as title.
Proposed resolution
Needs discussion
+++ b/core/lib/Drupal/Core/Field/FormatterPluginManager.php
@@ -183,7 +183,11 @@ public function getOptions($field_type = NULL) {
if ($field_type) {
- return !empty($this->formatterOptions[$field_type]) ? $this->formatterOptions[$field_type] : [];
+ if (!empty($this->formatterOptions[$field_type])) {
+ return $this->formatterOptions[$field_type];
+ }
+ @trigger_error("No default field formatter available to field type: $field_type or claimed default formatter does not support it. See https://www.drupal.org/project/drupal/issues/3112256.");
+ return [];
}