Return a string 'me' in EntityToJsonTransformer.php

This commit is contained in:
Julie Lenaerts 2025-03-13 15:26:41 +01:00
parent b4c6ccf309
commit 483d50e776

View File

@ -69,15 +69,7 @@ class EntityToJsonTransformer implements DataTransformerInterface
private function denormalizeOne(array|string $item)
{
if ('me' === $item) {
dump($item);
/* return
$this->denormalizer->denormalize(
// pass id of current user that we get from the exportGenerationContext...
['type' => User::class, 'id' => $item['id']],
User::class,
'json',
$context,
);*/
return $item;
}
if (!\array_key_exists('type', $item)) {
throw new TransformationFailedException('the key "type" is missing on element');