- Issue created by @BenStallings
- First commit to issue fork.
- π³π±Netherlands bbrala Netherlands
Context is great to have available there yeah, i do see a test failure though, which does seem to point to an issue?
My custom enhancer plugin is not receiving anything in the $context variable. When I backtrace, the context seems to be lost in ContentEntityDenormalizer::prepareInput() line 53:
$field_value = $enhancer ? $enhancer->transform($field_value) : $field_value;
Custom enhancers' transform() method allows for a second parameter, $context, but evidently core enhancers' does not.
I see that there were a couple of similar issues fixed 6 years ago, but this one (at least) remains.
Check whether the $enhancer allows a $context parameter, perhaps by using instanceof
, and if so, pass it the entity type, bundle, and field name in the $context.
Active
3.0
Code
Context is great to have available there yeah, i do see a test failure though, which does seem to point to an issue?