Problem
TranslatableTransformer::transform() writes to $value['_default'] before checking whether $value is a Translation object.
Because Translation implements ArrayAccess, this mutates the in-memory translation payload and adds _default to the stored translations array.
Current behavior
Transforming a Translation object for the form layer can leave the object mutated with internal form metadata inside translations.
Expected behavior
The transformer should normalize form data without mutating the original Translation object.
Notes
This was reproduced locally by transforming a Translation object and then checking getTranslations(), which contained _default.
Problem
TranslatableTransformer::transform()writes to$value['_default']before checking whether$valueis aTranslationobject.Because
TranslationimplementsArrayAccess, this mutates the in-memory translation payload and adds_defaultto the stored translations array.Current behavior
Transforming a
Translationobject for the form layer can leave the object mutated with internal form metadata insidetranslations.Expected behavior
The transformer should normalize form data without mutating the original
Translationobject.Notes
This was reproduced locally by transforming a
Translationobject and then checkinggetTranslations(), which contained_default.