autoMapper->map($data, Update::class); $user = $this->security->getUser(); if (!$user) { throw new AuthenticationException(); } if (!$update->getId()) { $update->setAuthor($user); } $update = $this->entityStateProcessor->process($update, $operation, $uriVariables, $context); return $this->autoMapper->map($update, $data); } }