From 1bfdef17044c56205a66a01a20c102222f039cb5 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Fri, 16 Feb 2024 09:15:53 +0100 Subject: [PATCH] TASK: Adjust naming of `NodeSerializer` methods --- Neos.ContentRepositoryRegistry/Classes/NodeSerializer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Neos.ContentRepositoryRegistry/Classes/NodeSerializer.php b/Neos.ContentRepositoryRegistry/Classes/NodeSerializer.php index 431cb8555bc..c4d565049bf 100644 --- a/Neos.ContentRepositoryRegistry/Classes/NodeSerializer.php +++ b/Neos.ContentRepositoryRegistry/Classes/NodeSerializer.php @@ -22,12 +22,12 @@ public function __construct( ) { } - public function denormalizeNodeFromIdentity(NodeIdentity $identity): Node + public function findNodeByIdentity(NodeIdentity $identity): Node { $contentRepository = $this->contentRepositoryRegistry->get($identity->contentRepositoryId); $workspace = $contentRepository->getWorkspaceFinder()->findOneByName($identity->workspaceName); if (!$workspace) { - throw new \RuntimeException(sprintf('Workspace could not be found while deserializing node NodeIdentity<%s>.', json_encode($identity, JSON_PARTIAL_OUTPUT_ON_ERROR)), 1707757488); + throw new \RuntimeException(sprintf('Workspace could not be found while fetching NodeIdentity<%s>.', json_encode($identity, JSON_PARTIAL_OUTPUT_ON_ERROR)), 1707757488); } $subgraph = $contentRepository->getContentGraph()->getSubgraph( $workspace->currentContentStreamId, @@ -37,12 +37,12 @@ public function denormalizeNodeFromIdentity(NodeIdentity $identity): Node ); $node = $subgraph->findNodeById($identity->nodeAggregateId); if (!$node) { - throw new \RuntimeException(sprintf('NodeAggregateId could not be found while deserializing node NodeIdentity<%s>.', json_encode($identity, JSON_PARTIAL_OUTPUT_ON_ERROR)), 1707772263); + throw new \RuntimeException(sprintf('NodeAggregateId could not be found while fetching NodeIdentity<%s>.', json_encode($identity, JSON_PARTIAL_OUTPUT_ON_ERROR)), 1707772263); } return $node; } - public function normalizeNodeToIdentity(Node $node): NodeIdentity + public function convertNodeToIdentity(Node $node): NodeIdentity { $contentRepository = $this->contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId); $workspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamId($node->subgraphIdentity->contentStreamId);