diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/NodeFactory.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/NodeFactory.php index 52b86afce16..5609db207f6 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/NodeFactory.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/NodeFactory.php @@ -22,7 +22,6 @@ use Neos\ContentRepository\Core\Infrastructure\Property\PropertyConverter; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphIdentity; use Neos\ContentRepository\Core\Projection\ContentGraph\CoverageByOrigin; use Neos\ContentRepository\Core\Projection\ContentGraph\DimensionSpacePointsBySubtreeTags; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; @@ -36,8 +35,7 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\Timestamps; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; -use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; -use Neos\ContentRepository\Core\SharedModel\Node\NodeAddress; +use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFound; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; @@ -159,7 +157,7 @@ public function mapReferenceRowsToReferences( /** * @param array> $nodeRows - * @throws NodeTypeNotFoundException + * @throws NodeTypeNotFound */ public function mapNodeRowsToNodeAggregate( array $nodeRows, @@ -243,7 +241,7 @@ public function mapNodeRowsToNodeAggregate( /** * @param iterable> $nodeRows * @return iterable - * @throws NodeTypeNotFoundException + * @throws NodeTypeNotFound */ public function mapNodeRowsToNodeAggregates( iterable $nodeRows, diff --git a/Neos.ContentRepository.Core/Classes/Feature/Common/ConstraintChecks.php b/Neos.ContentRepository.Core/Classes/Feature/Common/ConstraintChecks.php index 5674559e866..c906fb72772 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/Common/ConstraintChecks.php +++ b/Neos.ContentRepository.Core/Classes/Feature/Common/ConstraintChecks.php @@ -52,7 +52,6 @@ use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeIsNotOfTypeRoot; use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeIsOfTypeRoot; use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFound; -use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; use Neos\ContentRepository\Core\SharedModel\Exception\PropertyCannotBeSet; use Neos\ContentRepository\Core\SharedModel\Exception\ReferenceCannotBeSet; use Neos\ContentRepository\Core\SharedModel\Exception\RootNodeAggregateDoesNotExist; @@ -172,7 +171,7 @@ protected function requireRootNodeTypeToBeUnoccupied( /** * @param NodeType $nodeType - * @throws NodeTypeNotFoundException the configured child nodeType doesnt exist + * @throws NodeTypeNotFound the configured child nodeType doesnt exist */ protected function requireTetheredDescendantNodeTypesToExist(NodeType $nodeType): void { @@ -312,7 +311,7 @@ protected function requireConstraintsImposedByAncestorsAreMet( } /** - * @throws NodeTypeNotFoundException + * @throws NodeTypeNotFound * @throws NodeConstraintException */ protected function requireNodeTypeConstraintsImposedByParentToBeMet( diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php index 1c38334ff2d..461abd913b8 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php @@ -37,7 +37,7 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\ContentGraphInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; use Neos\ContentRepository\Core\SharedModel\Exception\ContentStreamDoesNotExistYet; -use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; +use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFound; use Neos\ContentRepository\Core\SharedModel\Exception\PropertyCannotBeSet; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; @@ -122,7 +122,7 @@ private function validateProperties(?PropertyValuesToWrite $propertyValues, Node /** * @throws ContentStreamDoesNotExistYet - * @throws NodeTypeNotFoundException + * @throws NodeTypeNotFound */ private function handleCreateNodeAggregateWithNodeAndSerializedProperties( CreateNodeAggregateWithNodeAndSerializedProperties $command, @@ -252,7 +252,7 @@ private function createRegularWithNode( /** * @throws ContentStreamDoesNotExistYet - * @throws NodeTypeNotFoundException + * @throws NodeTypeNotFound */ private function handleTetheredChildNodes( CreateNodeAggregateWithNodeAndSerializedProperties $command, diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/NodeTypeChange.php b/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/NodeTypeChange.php index 39219ddfd1b..a543db954f8 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/NodeTypeChange.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/NodeTypeChange.php @@ -36,7 +36,6 @@ use Neos\ContentRepository\Core\SharedModel\Exception\NodeAggregatesTypeIsAmbiguous; use Neos\ContentRepository\Core\SharedModel\Exception\NodeConstraintException; use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFound; -use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; @@ -97,7 +96,7 @@ abstract protected function createEventsForMissingTetheredNode( /** * @throws NodeTypeNotFound * @throws NodeConstraintException - * @throws NodeTypeNotFoundException + * @throws NodeTypeNotFound * @throws NodeAggregatesTypeIsAmbiguous * @throws \Exception */ @@ -225,7 +224,7 @@ private function handleChangeNodeAggregateType( /** * NOTE: when changing this method, {@see NodeTypeChange::deleteDisallowedNodesWhenChangingNodeType} * needs to be modified as well (as they are structurally the same) - * @throws NodeConstraintException|NodeTypeNotFoundException + * @throws NodeConstraintException|NodeTypeNotFound */ private function requireConstraintsImposedByHappyPathStrategyAreMet( ContentGraphInterface $contentGraph, diff --git a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/RootNodeHandling.php b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/RootNodeHandling.php index 8bd2e3cb142..d46ae0e7a42 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/RootNodeHandling.php +++ b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/RootNodeHandling.php @@ -38,7 +38,6 @@ use Neos\ContentRepository\Core\SharedModel\Exception\NodeAggregatesTypeIsAmbiguous; use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeIsNotOfTypeRoot; use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFound; -use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; @@ -180,7 +179,7 @@ private function handleUpdateRootNodeAggregateDimensions( /** * @throws ContentStreamDoesNotExistYet - * @throws NodeTypeNotFoundException + * @throws NodeTypeNotFound */ private function handleTetheredRootChildNodes( ContentStreamId $contentStreamId, diff --git a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php index d4de04228a2..c154e056c7d 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php +++ b/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php @@ -618,7 +618,7 @@ function () use ($commandHandlingDependencies, $remainingCommands) { * @throws WorkspaceDoesNotExist * @throws WorkspaceHasNoBaseWorkspaceName * @throws \Neos\ContentRepository\Core\SharedModel\Exception\NodeConstraintException - * @throws \Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException + * @throws \Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFound * @throws \Symfony\Component\Serializer\Exception\ExceptionInterface */ private function handleDiscardIndividualNodesFromWorkspace( diff --git a/Neos.ContentRepository.Core/Classes/NodeType/NodeTypeManager.php b/Neos.ContentRepository.Core/Classes/NodeType/NodeTypeManager.php index 7ade13450ab..73c79248ddb 100644 --- a/Neos.ContentRepository.Core/Classes/NodeType/NodeTypeManager.php +++ b/Neos.ContentRepository.Core/Classes/NodeType/NodeTypeManager.php @@ -17,7 +17,7 @@ use Neos\ContentRepository\Core\NodeType\Exception\TetheredNodeNotConfigured; use Neos\ContentRepository\Core\SharedModel\Exception\NodeConfigurationException; use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeIsFinalException; -use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; +use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFound; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\Utility\Arrays; use Neos\Utility\Exception\PropertyNotAccessibleException; @@ -108,7 +108,7 @@ public function getSubNodeTypes(string|NodeTypeName $superTypeName, bool $includ /** * Returns the specified node type (which could be abstract) * - * @throws NodeTypeNotFoundException + * @throws NodeTypeNotFound */ public function getNodeType(string|NodeTypeName $nodeTypeName): ?NodeType { @@ -269,7 +269,7 @@ public function isNodeTypeAllowedAsChildToTetheredNode(NodeType $parentNodeType, * @param array $completeNodeTypeConfiguration the full node type configuration for all node types * @throws NodeConfigurationException * @throws NodeTypeIsFinalException - * @throws NodeTypeNotFoundException + * @throws NodeTypeNotFound */ private function loadNodeType(string $nodeTypeName, array &$completeNodeTypeConfiguration): NodeType { @@ -278,7 +278,7 @@ private function loadNodeType(string $nodeTypeName, array &$completeNodeTypeConf } if (!isset($completeNodeTypeConfiguration[$nodeTypeName])) { - throw new NodeTypeNotFoundException('Node type "' . $nodeTypeName . '" does not exist', 1316451800); + throw new NodeTypeNotFound('Node type "' . $nodeTypeName . '" does not exist', 1316451800); } $nodeTypeConfiguration = $completeNodeTypeConfiguration[$nodeTypeName]; @@ -384,7 +384,7 @@ private function evaluateSuperTypeConfiguration( */ public function requireNodeType(string|NodeTypeName $nodeTypeName): NodeType { - return $this->getNodeType($nodeTypeName) ?? throw new NodeTypeNotFoundException( + return $this->getNodeType($nodeTypeName) ?? throw new NodeTypeNotFound( sprintf( 'The node type "%s" is not available', $nodeTypeName instanceof NodeTypeName ? $nodeTypeName->value : $nodeTypeName diff --git a/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeTypeNotFoundException.php b/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeTypeNotFoundException.php deleted file mode 100644 index aaba9799787..00000000000 --- a/Neos.ContentRepository.Core/Classes/SharedModel/Exception/NodeTypeNotFoundException.php +++ /dev/null @@ -1,25 +0,0 @@ -getNodeTypeManager()->getNodeType($nodeAggregate->nodeTypeName); - } catch (NodeTypeNotFoundException $e) { + } catch (NodeTypeNotFound $e) { $nodeType = null; } diff --git a/Neos.Neos/Classes/Command/SiteCommandController.php b/Neos.Neos/Classes/Command/SiteCommandController.php index 34d3b9ab037..06b9dc797fa 100644 --- a/Neos.Neos/Classes/Command/SiteCommandController.php +++ b/Neos.Neos/Classes/Command/SiteCommandController.php @@ -15,7 +15,7 @@ namespace Neos\Neos\Command; use Neos\ContentRepository\Core\SharedModel\Exception\NodeNameIsAlreadyCovered; -use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; +use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFound; use Neos\Flow\Annotations as Flow; use Neos\Flow\Cli\CommandController; use Neos\Flow\Package\PackageManager; @@ -89,7 +89,7 @@ public function createCommand($name, $packageKey, $nodeType, $nodeName = null, $ try { $this->siteService->createSite($packageKey, $name, $nodeType, $nodeName, $inactive); - } catch (NodeTypeNotFoundException $exception) { + } catch (NodeTypeNotFound $exception) { $this->outputLine('The given node type "%s" was not found', [$nodeType]); $this->quit(1); } catch (SiteNodeTypeIsInvalid $exception) { diff --git a/Neos.Neos/Classes/Controller/Module/Administration/SitesController.php b/Neos.Neos/Classes/Controller/Module/Administration/SitesController.php index 0eef114fab8..7ee46bbe473 100755 --- a/Neos.Neos/Classes/Controller/Module/Administration/SitesController.php +++ b/Neos.Neos/Classes/Controller/Module/Administration/SitesController.php @@ -19,7 +19,7 @@ use Neos\ContentRepository\Core\Projection\Workspace\Workspace; use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; use Neos\ContentRepository\Core\SharedModel\Exception\NodeNameIsAlreadyCovered; -use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; +use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFound; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; @@ -389,7 +389,7 @@ public function createSiteNodeAction($packageKey, $siteName, $nodeType) { try { $site = $this->siteService->createSite($packageKey, $siteName, $nodeType); - } catch (NodeTypeNotFoundException $exception) { + } catch (NodeTypeNotFound $exception) { $this->addFlashMessage( $this->getModuleLabel('sites.siteCreationError.givenNodeTypeNotFound.body', [$nodeType]), $this->getModuleLabel('sites.siteCreationError.givenNodeTypeNotFound.title'), diff --git a/Neos.Neos/Classes/Domain/Service/SiteServiceInternals.php b/Neos.Neos/Classes/Domain/Service/SiteServiceInternals.php index d18cc4c0aae..24fd9eeb985 100644 --- a/Neos.Neos/Classes/Domain/Service/SiteServiceInternals.php +++ b/Neos.Neos/Classes/Domain/Service/SiteServiceInternals.php @@ -27,7 +27,7 @@ use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; use Neos\ContentRepository\Core\Service\ContentRepositoryBootstrapper; -use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; +use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFound; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Node\NodeVariantSelectionStrategy; use Neos\Neos\Domain\Exception\SiteNodeTypeIsInvalid; @@ -85,7 +85,7 @@ public function createSiteNodeIfNotExists(Site $site, string $nodeTypeName): voi ); $siteNodeType = $this->nodeTypeManager->getNodeType($nodeTypeName); if (!$siteNodeType) { - throw new NodeTypeNotFoundException( + throw new NodeTypeNotFound( 'Cannot create a site using a non-existing node type.', 1412372375 ); diff --git a/Neos.Neos/Classes/Fusion/Cache/ContentCacheFlusher.php b/Neos.Neos/Classes/Fusion/Cache/ContentCacheFlusher.php index 0924a557057..4cc0154ad12 100644 --- a/Neos.Neos/Classes/Fusion/Cache/ContentCacheFlusher.php +++ b/Neos.Neos/Classes/Fusion/Cache/ContentCacheFlusher.php @@ -20,7 +20,7 @@ use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; -use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; +use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFound; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; @@ -276,7 +276,7 @@ function (array $types, NodeType $superType) use ($self) { /** * Fetches possible usages of the asset and registers nodes that use the asset as changed. * - * @throws NodeTypeNotFoundException + * @throws NodeTypeNotFound */ public function registerAssetChange(AssetInterface $asset): void {