From 888a66bb428e74fff67619b8a9bbbfa5cb8d2ced Mon Sep 17 00:00:00 2001 From: bwaidelich Date: Tue, 30 May 2023 17:59:22 +0200 Subject: [PATCH 01/53] BUGFIX: Allow disabling of auto-created Image Variants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes support for the setting `autoCreateImageVariantPresets` that was documented for a long time but never actually evaluated. This change set: * Adjusts `AssetService::assetCreated()` signal to only trigger `AssetVariantGenerator::createVariants()` if the `autoCreateImageVariantPresets` flag is set * Sets the default value of the flag to `true` for greater backwards compatibility * Adjusts `AssetVariantGenerator::createVariant()` to only create a variant if it does not exist already – previously multiple variants with the same identifiers could be created for a single asset leading to undeterministic behavior * Adds a button "Create missing Variants" to the `Variants` tab of the Media Module allowing editors to manually trigger creation of (missing) variants. Fixes: #4300 --- .../Classes/Controller/AssetController.php | 33 +++++++++++++++++++ Neos.Media.Browser/Configuration/Policy.yaml | 2 +- .../Private/Templates/Asset/Variants.html | 7 ++++ .../Private/Translations/en/Main.xlf | 3 ++ .../Domain/Service/AssetVariantGenerator.php | 6 ++++ Neos.Media/Classes/Package.php | 9 ++++- Neos.Media/Configuration/Settings.yaml | 2 +- Neos.Media/Documentation/VariantPresets.rst | 6 ++-- 8 files changed, 62 insertions(+), 6 deletions(-) diff --git a/Neos.Media.Browser/Classes/Controller/AssetController.php b/Neos.Media.Browser/Classes/Controller/AssetController.php index e82e3d6df41..b1e9ec03449 100644 --- a/Neos.Media.Browser/Classes/Controller/AssetController.php +++ b/Neos.Media.Browser/Classes/Controller/AssetController.php @@ -50,6 +50,7 @@ use Neos\Media\Domain\Repository\AssetRepository; use Neos\Media\Domain\Repository\TagRepository; use Neos\Media\Domain\Service\AssetService; +use Neos\Media\Domain\Service\AssetVariantGenerator; use Neos\Media\Exception\AssetServiceException; use Neos\Media\TypeConverter\AssetInterfaceConverter; use Neos\Neos\Controller\BackendUserTranslationTrait; @@ -140,6 +141,12 @@ class AssetController extends ActionController */ protected $assetSourceService; + /** + * @Flow\Inject + * @var AssetVariantGenerator + */ + protected $assetVariantGenerator; + /** * @var AssetSourceInterface[] */ @@ -468,6 +475,32 @@ public function variantsAction(string $assetSourceIdentifier, string $assetProxy } } + /** + * (Re-)create all variants for the given image + * + * @param string $assetSourceIdentifier + * @param string $assetProxyIdentifier + * @param string $overviewAction + * @throws StopActionException + * @throws UnsupportedRequestTypeException + */ + public function createVariantsAction(string $assetSourceIdentifier, string $assetProxyIdentifier, string $overviewAction): void + { + $assetSource = $this->assetSources[$assetSourceIdentifier]; + $assetProxyRepository = $assetSource->getAssetProxyRepository(); + + $assetProxy = $assetProxyRepository->getAssetProxy($assetProxyIdentifier); + $asset = $this->persistenceManager->getObjectByIdentifier($assetProxy->getLocalAssetIdentifier(), Asset::class); + + /** @var VariantSupportInterface $originalAsset */ + $originalAsset = ($asset instanceof AssetVariantInterface ? $asset->getOriginalAsset() : $asset); + + $this->assetVariantGenerator->createVariants($originalAsset); + $this->assetRepository->update($originalAsset); + + $this->redirect('variants', null, null, ['assetSourceIdentifier' => $assetSourceIdentifier, 'assetProxyIdentifier' => $assetProxyIdentifier, 'overviewAction' => $overviewAction]); + } + /** * @return void * @throws NoSuchArgumentException diff --git a/Neos.Media.Browser/Configuration/Policy.yaml b/Neos.Media.Browser/Configuration/Policy.yaml index 24e025b8edb..a237114296c 100644 --- a/Neos.Media.Browser/Configuration/Policy.yaml +++ b/Neos.Media.Browser/Configuration/Policy.yaml @@ -6,7 +6,7 @@ privilegeTargets: 'Neos.Media.Browser:ManageAssets': label: Allowed to manage assets - matcher: 'method(Neos\Media\Browser\Controller\(Asset|Image)Controller->(index|new|show|edit|update|initializeCreate|create|replaceAssetResource|updateAssetResource|initializeUpload|upload|tagAsset|delete|createTag|editTag|updateTag|deleteTag|addAssetToCollection|relatedNodes|variants)Action()) || method(Neos\Media\Browser\Controller\ImageVariantController->(update)Action())' + matcher: 'method(Neos\Media\Browser\Controller\(Asset|Image)Controller->(index|new|show|edit|update|initializeCreate|create|replaceAssetResource|updateAssetResource|initializeUpload|upload|tagAsset|delete|createTag|editTag|updateTag|deleteTag|addAssetToCollection|relatedNodes|variants|createVariants)Action()) || method(Neos\Media\Browser\Controller\ImageVariantController->(update)Action())' 'Neos.Media.Browser:AssetUsage': label: Allowed to calculate asset usages diff --git a/Neos.Media.Browser/Resources/Private/Templates/Asset/Variants.html b/Neos.Media.Browser/Resources/Private/Templates/Asset/Variants.html index 0c035452335..e024a452100 100644 --- a/Neos.Media.Browser/Resources/Private/Templates/Asset/Variants.html +++ b/Neos.Media.Browser/Resources/Private/Templates/Asset/Variants.html @@ -24,6 +24,13 @@ + + + diff --git a/Neos.Media.Browser/Resources/Private/Translations/en/Main.xlf b/Neos.Media.Browser/Resources/Private/Translations/en/Main.xlf index 81cddf67e1e..1f9682910d3 100644 --- a/Neos.Media.Browser/Resources/Private/Translations/en/Main.xlf +++ b/Neos.Media.Browser/Resources/Private/Translations/en/Main.xlf @@ -427,6 +427,9 @@ No document node found for this node + + Create missing Variants + diff --git a/Neos.Media/Classes/Domain/Service/AssetVariantGenerator.php b/Neos.Media/Classes/Domain/Service/AssetVariantGenerator.php index 4a8224515c0..77797c1a514 100644 --- a/Neos.Media/Classes/Domain/Service/AssetVariantGenerator.php +++ b/Neos.Media/Classes/Domain/Service/AssetVariantGenerator.php @@ -127,6 +127,12 @@ public function createVariant(AssetInterface $asset, string $presetIdentifier, s $createdVariant = null; $preset = $this->getVariantPresets()[$presetIdentifier] ?? null; if ($preset instanceof VariantPreset && $preset->matchesMediaType($asset->getMediaType())) { + + $existingVariant = $asset->getVariant($presetIdentifier, $variantIdentifier); + if ($existingVariant !== null) { + return $existingVariant; + } + $variantConfiguration = $preset->variants()[$variantIdentifier] ?? null; if ($variantConfiguration instanceof Configuration\Variant) { diff --git a/Neos.Media/Classes/Package.php b/Neos.Media/Classes/Package.php index 299f827307c..dd5b7b06fb5 100644 --- a/Neos.Media/Classes/Package.php +++ b/Neos.Media/Classes/Package.php @@ -11,8 +11,10 @@ * source code. */ +use Neos\Flow\Configuration\ConfigurationManager; use Neos\Flow\Core\Bootstrap; use Neos\Flow\Package\Package as BasePackage; +use Neos\Media\Domain\Model\AssetInterface; use Neos\Media\Domain\Model\ImportedAssetManager; use Neos\Media\Domain\Service\AssetService; use Neos\Media\Domain\Service\AssetVariantGenerator; @@ -30,7 +32,12 @@ class Package extends BasePackage public function boot(Bootstrap $bootstrap) { $dispatcher = $bootstrap->getSignalSlotDispatcher(); - $dispatcher->connect(AssetService::class, 'assetCreated', AssetVariantGenerator::class, 'createVariants'); + $dispatcher->connect(AssetService::class, 'assetCreated', function (AssetInterface $asset) use ($bootstrap) { + $configurationManager = $bootstrap->getObjectManager()->get(ConfigurationManager::class); + if ($configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Neos.Media.autoCreateImageVariantPresets')) { + $bootstrap->getObjectManager()->get(AssetVariantGenerator::class)->createVariants($asset); + } + }); $dispatcher->connect(AssetService::class, 'assetCreated', ThumbnailGenerator::class, 'createThumbnails'); $dispatcher->connect(AssetService::class, 'assetCreated', ImportedAssetManager::class, 'registerCreatedAsset'); $dispatcher->connect(AssetService::class, 'assetRemoved', ImportedAssetManager::class, 'registerRemovedAsset'); diff --git a/Neos.Media/Configuration/Settings.yaml b/Neos.Media/Configuration/Settings.yaml index 035e4020d23..8025a3d5774 100644 --- a/Neos.Media/Configuration/Settings.yaml +++ b/Neos.Media/Configuration/Settings.yaml @@ -65,7 +65,7 @@ Neos: # Variant presets variantPresets: [] # Automatically create asset variants for configured presets when assets are added - autoCreateImageVariantPresets: false + autoCreateImageVariantPresets: true thumbnailGenerators: diff --git a/Neos.Media/Documentation/VariantPresets.rst b/Neos.Media/Documentation/VariantPresets.rst index 02976ec41b2..d43dd11e921 100644 --- a/Neos.Media/Documentation/VariantPresets.rst +++ b/Neos.Media/Documentation/VariantPresets.rst @@ -92,14 +92,14 @@ The following example shows the required structure and possible fields of the pr options: aspectRatio: '1:1' -The automatic variant generation for new assets has to be enabled via setting as -by default this feature is disabled. +The automatic variant generation for new assets is active by default. +It can be disabled via setting: .. code-block:: yaml Neos: Media: - autoCreateImageVariantPresets: true + autoCreateImageVariantPresets: false To show and edit the variants in the media module the variants tab has to be enabled. From 3582ca2b8a3776861641251ec62a967608532e1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anke=20H=C3=A4slich?= Date: Thu, 13 Jul 2023 19:03:48 +0200 Subject: [PATCH 02/53] Apply suggestions from code review Co-authored-by: Bastian Waidelich --- Neos.Media.Browser/Classes/Controller/AssetController.php | 2 +- Neos.Media.Browser/Resources/Private/Translations/en/Main.xlf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Neos.Media.Browser/Classes/Controller/AssetController.php b/Neos.Media.Browser/Classes/Controller/AssetController.php index b1e9ec03449..141326a6951 100644 --- a/Neos.Media.Browser/Classes/Controller/AssetController.php +++ b/Neos.Media.Browser/Classes/Controller/AssetController.php @@ -476,7 +476,7 @@ public function variantsAction(string $assetSourceIdentifier, string $assetProxy } /** - * (Re-)create all variants for the given image + * Create missing variants for the given image * * @param string $assetSourceIdentifier * @param string $assetProxyIdentifier diff --git a/Neos.Media.Browser/Resources/Private/Translations/en/Main.xlf b/Neos.Media.Browser/Resources/Private/Translations/en/Main.xlf index 1f9682910d3..07f3354ed02 100644 --- a/Neos.Media.Browser/Resources/Private/Translations/en/Main.xlf +++ b/Neos.Media.Browser/Resources/Private/Translations/en/Main.xlf @@ -428,7 +428,7 @@ No document node found for this node - Create missing Variants + Create missing variants From c3da3633873d30147fc10033df0969f4c83f4b39 Mon Sep 17 00:00:00 2001 From: Marc Henry Schultz <85400359+mhsdesign@users.noreply.github.com> Date: Sun, 17 Sep 2023 12:25:26 +0200 Subject: [PATCH 03/53] BUGFIX: `props` will be unset after an exception Resolves #4525 --- .../Classes/FusionObjects/ComponentImplementation.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Neos.Fusion/Classes/FusionObjects/ComponentImplementation.php b/Neos.Fusion/Classes/FusionObjects/ComponentImplementation.php index 8b83ad88509..f1bc064d58d 100644 --- a/Neos.Fusion/Classes/FusionObjects/ComponentImplementation.php +++ b/Neos.Fusion/Classes/FusionObjects/ComponentImplementation.php @@ -80,8 +80,10 @@ protected function getProps(array $context): \ArrayAccess protected function render(array $context) { $this->runtime->pushContextArray($context); - $result = $this->runtime->render($this->path . '/renderer'); - $this->runtime->popContext(); - return $result; + try { + return $this->runtime->render($this->path . '/renderer'); + } finally { + $this->runtime->popContext(); + } } } From ac88f59aabc8c0abca27c5b270ad3f71c09ba0fe Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Mon, 18 Sep 2023 20:41:07 +0200 Subject: [PATCH 04/53] !!! TASK Make NodeType::getPropertyType throw if property not declared Resolves #4477 --- .../Classes/NodeType/NodeType.php | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php b/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php index 91f4d254b78..337ba220878 100644 --- a/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php +++ b/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php @@ -409,22 +409,32 @@ public function getProperties(): array } /** - * Returns the configured type of the specified property + * Check if the property is configured in the schema. + */ + public function hasProperty(string $propertyName): bool + { + $this->initialize(); + + return isset($this->fullConfiguration['properties'][$propertyName]); + } + + /** + * Returns the configured type of the specified property, and falls back to 'string'. * - * @param string $propertyName Name of the property + * @throws \InvalidArgumentException if the property is not configured */ public function getPropertyType(string $propertyName): string { $this->initialize(); - if ( - !isset($this->fullConfiguration['properties']) - || !isset($this->fullConfiguration['properties'][$propertyName]) - || !isset($this->fullConfiguration['properties'][$propertyName]['type']) - ) { - return 'string'; + if (!$this->hasProperty($propertyName)) { + throw new \InvalidArgumentException( + sprintf('NodeType schema has no property "%s" configured. Cannot read its type.', $propertyName), + 1695062252040 + ); } - return $this->fullConfiguration['properties'][$propertyName]['type']; + + return $this->fullConfiguration['properties'][$propertyName]['type'] ?? 'string'; } /** From 55e1ebfd6825bc17902706a1a1cf7b24c6e80955 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Sun, 24 Sep 2023 21:34:49 +0200 Subject: [PATCH 05/53] BUGFIX: Fix `${q(node).property("undefined")}` access. NodeType schema has no property "undefined" configured. Cannot read its type. --- .../Classes/FlowQueryOperations/PropertyOperation.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PropertyOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PropertyOperation.php index 127a0244727..dc3701cdda4 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PropertyOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/PropertyOperation.php @@ -110,7 +110,11 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): mixed return ObjectAccess::getPropertyPath($element, substr($propertyName, 1)); } - if ($element->nodeType->getPropertyType($propertyName) === 'reference') { + $propertyType = $element->nodeType->hasProperty($propertyName) + ? $element->nodeType->getPropertyType($propertyName) + : null; + + if ($propertyType === 'reference') { $subgraph = $this->contentRepositoryRegistry->subgraphForNode($element); return ( $subgraph->findReferences( @@ -120,7 +124,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): mixed )?->node; } - if ($element->nodeType->getPropertyType($propertyName) === 'references') { + if ($propertyType === 'references') { $subgraph = $this->contentRepositoryRegistry->subgraphForNode($element); return $subgraph->findReferences( $element->nodeAggregateId, From ec9d8e5fb5268793d2b0afa32a0ee9c761375666 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Sat, 21 Oct 2023 09:17:52 +0000 Subject: [PATCH 06/53] TASK: Update references [skip ci] --- Neos.Neos/Documentation/References/CommandReference.rst | 2 +- Neos.Neos/Documentation/References/EelHelpersReference.rst | 2 +- .../Documentation/References/FlowQueryOperationReference.rst | 2 +- .../Documentation/References/Signals/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/Signals/Flow.rst | 2 +- Neos.Neos/Documentation/References/Signals/Media.rst | 2 +- Neos.Neos/Documentation/References/Signals/Neos.rst | 2 +- Neos.Neos/Documentation/References/Validators/Flow.rst | 2 +- Neos.Neos/Documentation/References/Validators/Media.rst | 2 +- Neos.Neos/Documentation/References/Validators/Party.rst | 2 +- .../Documentation/References/ViewHelpers/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Form.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Media.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Neos.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Neos.Neos/Documentation/References/CommandReference.rst b/Neos.Neos/Documentation/References/CommandReference.rst index c0596712596..ee73a6130ea 100644 --- a/Neos.Neos/Documentation/References/CommandReference.rst +++ b/Neos.Neos/Documentation/References/CommandReference.rst @@ -19,7 +19,7 @@ commands that may be available, use:: ./flow help -The following reference was automatically generated from code on 2023-10-14 +The following reference was automatically generated from code on 2023-10-21 .. _`Neos Command Reference: NEOS.CONTENTREPOSITORY`: diff --git a/Neos.Neos/Documentation/References/EelHelpersReference.rst b/Neos.Neos/Documentation/References/EelHelpersReference.rst index 6695a423ad2..79acd948b5e 100644 --- a/Neos.Neos/Documentation/References/EelHelpersReference.rst +++ b/Neos.Neos/Documentation/References/EelHelpersReference.rst @@ -3,7 +3,7 @@ Eel Helpers Reference ===================== -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Eel Helpers Reference: Api`: diff --git a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst index 447b2789610..582e91c9267 100644 --- a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst +++ b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst @@ -3,7 +3,7 @@ FlowQuery Operation Reference ============================= -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`FlowQuery Operation Reference: add`: diff --git a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst index 5d8d337ab11..66dd6924281 100644 --- a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository Signals Reference ==================================== -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Content Repository Signals Reference: Context (``Neos\ContentRepository\Domain\Service\Context``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Flow.rst b/Neos.Neos/Documentation/References/Signals/Flow.rst index 574b2383f18..359257c7ed2 100644 --- a/Neos.Neos/Documentation/References/Signals/Flow.rst +++ b/Neos.Neos/Documentation/References/Signals/Flow.rst @@ -3,7 +3,7 @@ Flow Signals Reference ====================== -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Flow Signals Reference: AbstractAdvice (``Neos\Flow\Aop\Advice\AbstractAdvice``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Media.rst b/Neos.Neos/Documentation/References/Signals/Media.rst index 07d83856e7c..350cb44df2c 100644 --- a/Neos.Neos/Documentation/References/Signals/Media.rst +++ b/Neos.Neos/Documentation/References/Signals/Media.rst @@ -3,7 +3,7 @@ Media Signals Reference ======================= -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Media Signals Reference: AssetCollectionController (``Neos\Media\Browser\Controller\AssetCollectionController``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Neos.rst b/Neos.Neos/Documentation/References/Signals/Neos.rst index 48587653f98..937847a87a7 100644 --- a/Neos.Neos/Documentation/References/Signals/Neos.rst +++ b/Neos.Neos/Documentation/References/Signals/Neos.rst @@ -3,7 +3,7 @@ Neos Signals Reference ====================== -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Neos Signals Reference: AbstractCreate (``Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate``)`: diff --git a/Neos.Neos/Documentation/References/Validators/Flow.rst b/Neos.Neos/Documentation/References/Validators/Flow.rst index 683898f185f..e4c5c45cf0f 100644 --- a/Neos.Neos/Documentation/References/Validators/Flow.rst +++ b/Neos.Neos/Documentation/References/Validators/Flow.rst @@ -3,7 +3,7 @@ Flow Validator Reference ======================== -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Flow Validator Reference: AggregateBoundaryValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Media.rst b/Neos.Neos/Documentation/References/Validators/Media.rst index 30d84bea30f..9e9407aff36 100644 --- a/Neos.Neos/Documentation/References/Validators/Media.rst +++ b/Neos.Neos/Documentation/References/Validators/Media.rst @@ -3,7 +3,7 @@ Media Validator Reference ========================= -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Media Validator Reference: ImageOrientationValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Party.rst b/Neos.Neos/Documentation/References/Validators/Party.rst index 6d51a82d932..7f7479f57ad 100644 --- a/Neos.Neos/Documentation/References/Validators/Party.rst +++ b/Neos.Neos/Documentation/References/Validators/Party.rst @@ -3,7 +3,7 @@ Party Validator Reference ========================= -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Party Validator Reference: AimAddressValidator`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst index 54a805fba69..b073d7b8500 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository ViewHelper Reference ####################################### -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Content Repository ViewHelper Reference: PaginateViewHelper`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst index 2bba73fe9cd..6f6aaf4574e 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst @@ -3,7 +3,7 @@ FluidAdaptor ViewHelper Reference ################################# -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`FluidAdaptor ViewHelper Reference: f:debug`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst index f03a66dd3b4..032e57f64b7 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst @@ -3,7 +3,7 @@ Form ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Form ViewHelper Reference: neos.form:form`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst index 7e70388c7b9..d578688b50b 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst @@ -3,7 +3,7 @@ Fusion ViewHelper Reference ########################### -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Fusion ViewHelper Reference: fusion:render`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst index 162af432765..d25b770036d 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst @@ -3,7 +3,7 @@ Media ViewHelper Reference ########################## -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Media ViewHelper Reference: neos.media:fileTypeIcon`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst index 5d2129451e5..c5191e870e1 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst @@ -3,7 +3,7 @@ Neos ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Neos ViewHelper Reference: neos:backend.authenticationProviderLabel`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst index 36ca8d3ae18..6a3a594c574 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst @@ -3,7 +3,7 @@ TYPO3 Fluid ViewHelper Reference ################################ -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`TYPO3 Fluid ViewHelper Reference: f:alias`: From 07bcb34639dbf177ac9470252122c7facc25f4a2 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Sat, 21 Oct 2023 09:22:35 +0000 Subject: [PATCH 07/53] TASK: Update references [skip ci] --- .../References/CommandReference.rst | 736 ++++++++++++------ .../References/EelHelpersReference.rst | 11 +- .../FlowQueryOperationReference.rst | 2 +- .../References/Signals/ContentRepository.rst | 2 +- .../Documentation/References/Signals/Flow.rst | 2 +- .../References/Signals/Media.rst | 2 +- .../Documentation/References/Signals/Neos.rst | 2 +- .../References/Validators/Flow.rst | 2 +- .../References/Validators/Media.rst | 2 +- .../References/Validators/Party.rst | 2 +- .../ViewHelpers/ContentRepository.rst | 2 +- .../References/ViewHelpers/FluidAdaptor.rst | 2 +- .../References/ViewHelpers/Form.rst | 2 +- .../References/ViewHelpers/Fusion.rst | 2 +- .../References/ViewHelpers/Media.rst | 2 +- .../References/ViewHelpers/Neos.rst | 2 +- .../References/ViewHelpers/TYPO3Fluid.rst | 2 +- 17 files changed, 506 insertions(+), 271 deletions(-) diff --git a/Neos.Neos/Documentation/References/CommandReference.rst b/Neos.Neos/Documentation/References/CommandReference.rst index c9d37944f08..ee73a6130ea 100644 --- a/Neos.Neos/Documentation/References/CommandReference.rst +++ b/Neos.Neos/Documentation/References/CommandReference.rst @@ -19,7 +19,7 @@ commands that may be available, use:: ./flow help -The following reference was automatically generated from code on 2017-05-11 +The following reference was automatically generated from code on 2023-10-21 .. _`Neos Command Reference: NEOS.CONTENTREPOSITORY`: @@ -63,14 +63,14 @@ configuration and constraints. *Remove undefined node properties* removeUndefinedProperties -Will remove all undefined properties according to the node type configuration. - *Remove broken object references* removeBrokenEntityReferences Detects and removes references from nodes to entities which don't exist anymore (for example Image nodes referencing ImageVariant objects which are gone for some reason). +Will remove all undefined properties according to the node type configuration. + *Remove nodes with invalid dimensions* removeNodesWithInvalidDimensions @@ -102,6 +102,7 @@ reorderChildNodes For all nodes (or only those which match the --node-type filter specified with this command) which have configured child nodes, those child nodes are reordered according to the position from the parents NodeType configuration. + *Missing default properties* addMissingDefaultValues @@ -119,6 +120,12 @@ It searches for nodes which have a corresponding node in one of the base workspa have different node paths, but don't have a corresponding shadow node with a "movedto" value. +*Create missing sites node* +createMissingSitesNode + +If needed, creates a missing "/sites" node, which is essential for Neos to work +properly. + *Generate missing URI path segments* generateUriPathSegments @@ -133,13 +140,13 @@ Removes content dimensions from the root and sites nodes **Examples:** -``./flow node:repair`` +./flow node:repair -``./flow node:repair --node-type Neos.NodeTypes:Page`` +./flow node:repair --node-type Acme.Com:Page -``./flow node:repair --workspace user-robert --only removeOrphanNodes,removeNodesWithInvalidDimensions`` +./flow node:repair --workspace user-robert --only removeOrphanNodes,removeNodesWithInvalidDimensions -``./flow node:repair --skip removeUndefinedProperties`` +./flow node:repair --skip removeUndefinedProperties @@ -153,7 +160,7 @@ Options ``--dry-run`` Don't do anything, but report actions ``--cleanup`` - If FALSE, cleanup tasks are skipped + If false, cleanup tasks are skipped ``--skip`` Skip the given check or checks (comma separated) ``--only`` @@ -169,6 +176,31 @@ Package *NEOS.FLOW* ------------------- +.. _`Neos Command Reference: NEOS.FLOW neos.flow:cache:collectgarbage`: + +``neos.flow:cache:collectgarbage`` +********************************** + +**Cache Garbage Collection** + +Runs the Garbage Collection (collectGarbage) method on all registered caches. + +Though the method is defined in the BackendInterface, the implementation +can differ and might not remove any data, depending on possibilities of +the backend. + + + +Options +^^^^^^^ + +``--cache-identifier`` + If set, this command only applies to the given cache + + + + + .. _`Neos Command Reference: NEOS.FLOW neos.flow:cache:flush`: ``neos.flow:cache:flush`` @@ -177,7 +209,8 @@ Package *NEOS.FLOW* **Flush all caches** The flush command flushes all caches (including code caches) which have been -registered with Flow's Cache Manager. It also removes any session data. +registered with Flow's Cache Manager. It will NOT remove any session data, unless +you specifically configure the session caches to not be persistent. If fatal errors caused by a package prevent the compile time bootstrap from running, the removal of any temporary data can be forced by specifying @@ -243,6 +276,122 @@ Related commands +.. _`Neos Command Reference: NEOS.FLOW neos.flow:cache:list`: + +``neos.flow:cache:list`` +************************ + +**List all configured caches and their status if available** + +This command will exit with a code 1 if at least one cache status contains errors or warnings +This allows the command to be easily integrated in CI setups (the --quiet flag can be used to reduce verbosity) + + + +Options +^^^^^^^ + +``--quiet`` + If set, this command only outputs errors & warnings + + + +Related commands +^^^^^^^^^^^^^^^^ + +``neos.flow:cache:show`` + Display details of a cache including a detailed status if available + + + +.. _`Neos Command Reference: NEOS.FLOW neos.flow:cache:setup`: + +``neos.flow:cache:setup`` +************************* + +**Setup the given Cache if possible** + +Invokes the setup() method on the configured CacheBackend (if it implements the WithSetupInterface) +which should setup and validate the backend (i.e. create required database tables, directories, ...) + +Arguments +^^^^^^^^^ + +``--cache-identifier`` + + + + + + +Related commands +^^^^^^^^^^^^^^^^ + +``neos.flow:cache:list`` + List all configured caches and their status if available +``neos.flow:cache:setupall`` + Setup all Caches + + + +.. _`Neos Command Reference: NEOS.FLOW neos.flow:cache:setupall`: + +``neos.flow:cache:setupall`` +**************************** + +**Setup all Caches** + +Invokes the setup() method on all configured CacheBackend that implement the WithSetupInterface interface +which should setup and validate the backend (i.e. create required database tables, directories, ...) + +This command will exit with a code 1 if at least one cache setup failed +This allows the command to be easily integrated in CI setups (the --quiet flag can be used to reduce verbosity) + + + +Options +^^^^^^^ + +``--quiet`` + If set, this command only outputs errors & warnings + + + +Related commands +^^^^^^^^^^^^^^^^ + +``neos.flow:cache:setup`` + Setup the given Cache if possible + + + +.. _`Neos Command Reference: NEOS.FLOW neos.flow:cache:show`: + +``neos.flow:cache:show`` +************************ + +**Display details of a cache including a detailed status if available** + + + +Arguments +^^^^^^^^^ + +``--cache-identifier`` + identifier of the cache (for example "Flow_Core") + + + + + +Related commands +^^^^^^^^^^^^^^^^ + +``neos.flow:cache:list`` + List all configured caches and their status if available + + + .. _`Neos Command Reference: NEOS.FLOW neos.flow:cache:warmup`: ``neos.flow:cache:warmup`` @@ -320,7 +469,14 @@ Options The command shows the configuration of the current context as it is used by Flow itself. You can specify the configuration type and path if you want to show parts of the configuration. -./flow configuration:show --type Settings --path Neos.Flow.persistence +Display all settings: +./flow configuration:show + +Display Flow persistence settings: +./flow configuration:show --path Neos.Flow.persistence + +Display Flow Object Cache configuration +./flow configuration:show --type Caches --path Flow_Object_Classes @@ -328,7 +484,7 @@ Options ^^^^^^^ ``--type`` - Configuration type to show + Configuration type to show, defaults to Settings ``--path`` path to subconfiguration separated by "." like "Neos.Flow @@ -362,7 +518,7 @@ Options ``--path`` path to the subconfiguration separated by "." like "Neos.Flow ``--verbose`` - if TRUE, output more verbose information on the schema files which were used + if true, output more verbose information on the schema files which were used @@ -444,23 +600,6 @@ Arguments -.. _`Neos Command Reference: NEOS.FLOW neos.flow:core:shell`: - -``neos.flow:core:shell`` -************************ - -**Run the interactive Shell** - -The shell command runs Flow's interactive shell. This shell allows for -entering commands like through the regular command line interface but -additionally supports autocompletion and a user-based command history. - - - - - - - .. _`Neos Command Reference: NEOS.FLOW neos.flow:database:setcharset`: ``neos.flow:database:setcharset`` @@ -480,20 +619,19 @@ For background information on this, see: - http://stackoverflow.com/questions/766809/ - http://dev.mysql.com/doc/refman/5.5/en/alter-table.html +- https://medium.com/@adamhooper/in-mysql-never-use-utf8-use-utf8mb4-11761243e434 +- https://mathiasbynens.be/notes/mysql-utf8mb4 +- https://florian.ec/articles/mysql-doctrine-utf8/ -The main purpose of this is to fix setups that were created with Flow 2.3.x or earlier and whose -database server did not have a default collation of utf8mb4_unicode_ci. In those cases, the tables will -have a collation that does not match the default collation of later Flow versions, potentially leading -to problems when creating foreign key constraints (among others, potentially). +The main purpose of this is to fix setups that were created with Flow before version 5.0. In those cases, +the tables will have a collation that does not match the default collation of later Flow versions, potentially +leading to problems when creating foreign key constraints (among others, potentially). If you have special needs regarding the charset and collation, you *can* override the defaults with -different ones. One thing this might be useful for is when switching to the utf8mb4mb4 character set, see: - -- https://mathiasbynens.be/notes/mysql-utf8mb4 -- https://florian.ec/articles/mysql-doctrine-utf8/ +different ones. Note: This command **is not a general purpose conversion tool**. It will specifically not fix cases -of actual utf8mb4 stored in latin1 columns. For this a conversion to BLOB followed by a conversion to the +of actual utf8 stored in latin1 columns. For this a conversion to BLOB followed by a conversion to the proper type, charset and collation is needed instead. @@ -697,7 +835,7 @@ Related commands **Generate a new migration** -If $diffAgainstCurrent is TRUE (the default), it generates a migration file +If $diffAgainstCurrent is true (the default), it generates a migration file with the diff between current DB structure and the found mapping metadata. Otherwise an empty migration skeleton is generated. @@ -722,6 +860,8 @@ Options Whether to base the migration on the current schema structure ``--filter-expression`` Only include tables/sequences matching the filter expression regexp +``--force`` + Generate migrations even if there are migrations left to execute @@ -756,8 +896,6 @@ Options ``--show-migrations`` Output a list of all migrations and their status -``--show-descriptions`` - Show descriptions for the migrations (enables versions display) @@ -898,30 +1036,18 @@ Options -.. _`Neos Command Reference: NEOS.FLOW neos.flow:package:activate`: - -``neos.flow:package:activate`` -****************************** +.. _`Neos Command Reference: NEOS.FLOW neos.flow:middleware:list`: -**Activate an available package** - -This command activates an existing, but currently inactive package. - -Arguments -^^^^^^^^^ +``neos.flow:middleware:list`` +***************************** -``--package-key`` - The package key of the package to create +**Lists all configured middleware components in the order they will be executed** -Related commands -^^^^^^^^^^^^^^^^ -``neos.flow:package:deactivate`` - Deactivate a package @@ -959,54 +1085,6 @@ Related commands -.. _`Neos Command Reference: NEOS.FLOW neos.flow:package:deactivate`: - -``neos.flow:package:deactivate`` -******************************** - -**Deactivate a package** - -This command deactivates a currently active package. - -Arguments -^^^^^^^^^ - -``--package-key`` - The package key of the package to create - - - - - -Related commands -^^^^^^^^^^^^^^^^ - -``neos.flow:package:activate`` - Activate an available package - - - -.. _`Neos Command Reference: NEOS.FLOW neos.flow:package:delete`: - -``neos.flow:package:delete`` -**************************** - -**Delete an existing package** - -This command deletes an existing package identified by the package key. - -Arguments -^^^^^^^^^ - -``--package-key`` - The package key of the package to create - - - - - - - .. _`Neos Command Reference: NEOS.FLOW neos.flow:package:freeze`: ``neos.flow:package:freeze`` @@ -1055,7 +1133,7 @@ Related commands **List available packages** Lists all locally available packages. Displays the package key, version and -package title and its state – active or inactive. +package title. @@ -1067,14 +1145,6 @@ Options -Related commands -^^^^^^^^^^^^^^^^ - -``neos.flow:package:activate`` - Activate an available package -``neos.flow:package:deactivate`` - Deactivate a package - .. _`Neos Command Reference: NEOS.FLOW neos.flow:package:refreeze`: @@ -1240,23 +1310,70 @@ Options -.. _`Neos Command Reference: NEOS.FLOW neos.flow:routing:getpath`: +.. _`Neos Command Reference: NEOS.FLOW neos.flow:routing:list`: + +``neos.flow:routing:list`` +************************** + +**List the known routes** + +This command displays a list of all currently registered routes. + + + + + + + +.. _`Neos Command Reference: NEOS.FLOW neos.flow:routing:match`: + +``neos.flow:routing:match`` +*************************** + +**Match the given URI to a corresponding route** + +This command takes an incoming URI and displays the +matched Route and the mapped routing values (if any): + +./flow routing:match "/de" --parameters="{\"requestUriHost\": \"localhost\"}" + +Arguments +^^^^^^^^^ + +``--uri`` + The incoming route, absolute or relative + + + +Options +^^^^^^^ + +``--method`` + The HTTP method to simulate (default is 'GET') +``--parameters`` + Route parameters as JSON string. Make sure to specify this option as described in the description in order to prevent parsing issues + + + + + +.. _`Neos Command Reference: NEOS.FLOW neos.flow:routing:resolve`: -``neos.flow:routing:getpath`` +``neos.flow:routing:resolve`` ***************************** -**Generate a route path** +**Build an URI for the given parameters** This command takes package, controller and action and displays the -generated route path and the selected route: +resolved URI and which route matched (if any): -./flow routing:getPath --format json Acme.Demo\\Sub\\Package +./flow routing:resolve Some.Package --controller SomeController --additional-arguments="{\"some-argument\": \"some-value\"}" Arguments ^^^^^^^^^ ``--package`` - Package key and subpackage, subpackage parts are separated with backslashes + Package key (according to "@package" route value) @@ -1264,73 +1381,86 @@ Options ^^^^^^^ ``--controller`` - Controller name, default is 'Standard' + Controller name (according to "@controller" route value), default is 'Standard' ``--action`` - Action name, default is 'index' + Action name (according to "@action" route value), default is 'index' ``--format`` - Requested Format name default is 'html' + Requested Format name (according to "@format" route value), default is 'html' +``--subpackage`` + SubPackage name (according to "@subpackage" route value) +``--additional-arguments`` + Additional route values as JSON string. Make sure to specify this option as described in the description in order to prevent parsing issues +``--parameters`` + Route parameters as JSON string. Make sure to specify this option as described in the description in order to prevent parsing issues +``--base-uri`` + Base URI of the simulated request, default ist 'http://localhost' +``--force-absolute-uri`` + Whether or not to force the creation of an absolute URI -.. _`Neos Command Reference: NEOS.FLOW neos.flow:routing:list`: +.. _`Neos Command Reference: NEOS.FLOW neos.flow:routing:show`: -``neos.flow:routing:list`` +``neos.flow:routing:show`` ************************** -**List the known routes** +**Show information for a route** -This command displays a list of all currently registered routes. +This command displays the configuration of a route specified by index number. + +Arguments +^^^^^^^^^ +``--index`` + The index of the route as given by routing:list -.. _`Neos Command Reference: NEOS.FLOW neos.flow:routing:routepath`: -``neos.flow:routing:routepath`` -******************************* +.. _`Neos Command Reference: NEOS.FLOW neos.flow:schema:validate`: -**Route the given route path** +``neos.flow:schema:validate`` +***************************** -This command takes a given path and displays the detected route and -the selected package, controller and action. +**Validate the given configurationfile againt a schema file** -Arguments -^^^^^^^^^ -``--path`` - The route path to resolve Options ^^^^^^^ -``--method`` - The request method (GET, POST, PUT, DELETE, ...) to simulate +``--configuration-file`` + path to the validated configuration file +``--schema-file`` + path to the schema file +``--verbose`` + if true, output more verbose information on the schema files which were used -.. _`Neos Command Reference: NEOS.FLOW neos.flow:routing:show`: +.. _`Neos Command Reference: NEOS.FLOW neos.flow:security:describerole`: -``neos.flow:routing:show`` -************************** +``neos.flow:security:describerole`` +*********************************** + +**Show details of a specified role** -**Show information for a route** -This command displays the configuration of a route specified by index number. Arguments ^^^^^^^^^ -``--index`` - The index of the route as given by routing:list +``--role`` + identifier of the role to describe (for example "Neos.Flow:Everybody") @@ -1432,6 +1562,27 @@ Related commands +.. _`Neos Command Reference: NEOS.FLOW neos.flow:security:listroles`: + +``neos.flow:security:listroles`` +******************************** + +**List all configured roles** + + + + + +Options +^^^^^^^ + +``--include-abstract`` + Set this flag to include abstract roles + + + + + .. _`Neos Command Reference: NEOS.FLOW neos.flow:security:showeffectivepolicy`: ``neos.flow:security:showeffectivepolicy`` @@ -1524,6 +1675,48 @@ Options +.. _`Neos Command Reference: NEOS.FLOW neos.flow:session:destroyall`: + +``neos.flow:session:destroyall`` +******************************** + +**Destroys all sessions.** + +This special command is needed, because sessions are kept in persistent storage and are not flushed +with other caches by default. + +This is functionally equivalent to +`./flow flow:cache:flushOne Flow_Session_Storage && ./flow flow:cache:flushOne Flow_Session_MetaData` + + + + + + + +.. _`Neos Command Reference: NEOS.FLOW neos.flow:signal:listconnected`: + +``neos.flow:signal:listconnected`` +********************************** + +**Lists all connected signals with their slots.** + + + + + +Options +^^^^^^^ + +``--class-name`` + if specified, only signals matching the given fully qualified class name will be shown. Note: escape namespace separators or wrap the value in quotes, e.g. "--class-name Neos\\Flow\\Core\\Bootstrap". +``--method-name`` + if specified, only signals matching the given method name will be shown. This is only useful in conjunction with the "--class-name" option. + + + + + .. _`Neos Command Reference: NEOS.FLOW neos.flow:typeconverter:list`: ``neos.flow:typeconverter:list`` @@ -1565,7 +1758,7 @@ Generates Schema documentation (XSD) for your ViewHelpers, preparing the file to be placed online and used by any XSD-aware editor. After creating the XSD file, reference it in your IDE and import the namespace in your Fluid template by adding the xmlns:* attribute(s): - + Arguments ^^^^^^^^^ @@ -1579,9 +1772,11 @@ Options ^^^^^^^ ``--xsd-namespace`` - Unique target namespace used in the XSD schema (for example "http://yourdomain.org/ns/viewhelpers"). Defaults to "http://typo3.org/ns/". + Unique target namespace used in the XSD schema (for example "http://yourdomain.org/ns/viewhelpers"). Defaults to "https://neos.io/ns/". ``--target-file`` File path and name of the generated XSD schema. If not specified the schema will be output to standard output. +``--xsd-domain`` + Domain used in the XSD schema (for example "http://yourdomain.org"). Defaults to "https://neos.io". @@ -1614,8 +1809,9 @@ exist. By using the --generate-related flag, a missing package, model or repository can be created alongside, avoiding such an error. By specifying the --generate-templates flag, this command will also create -matching Fluid templates for the actions created. This option can only be -used in combination with --generate-actions. +matching Fluid templates for the actions created. +Alternatively, by specifying the --generate-fusion flag, this command will +create matching Fusion files for the actions. The default behavior is to not overwrite any existing code. This can be overridden by specifying the --force flag. @@ -1637,8 +1833,10 @@ Options Also generate index, show, new, create, edit, update and delete actions. ``--generate-templates`` Also generate the templates for each action. +``--generate-fusion`` + If Fusion templates should be generated instead of Fluid. ``--generate-related`` - Also create the mentioned package, related model and repository if neccessary. + Also create the mentioned package, related model and repository if necessary. ``--force`` Overwrite any existing controller or template code. Regardless of this flag, the package, model and repository will never be overwritten. @@ -1766,13 +1964,19 @@ Arguments +Options +^^^^^^^ + +``--package-type`` + Optional package type, e.g. "neos-plugin + Related commands ^^^^^^^^^^^^^^^^ -``typo3.flow:package:create`` - *Command not available* +``neos.flow:package:create`` + Create a new package @@ -1811,6 +2015,35 @@ Related commands +.. _`Neos Command Reference: NEOS.KICKSTARTER neos.kickstarter:kickstart:translation`: + +``neos.kickstarter:kickstart:translation`` +****************************************** + +**Kickstart translation** + +Generates the translation files for the given package. + +Arguments +^^^^^^^^^ + +``--package-key`` + The package key of the package for the translation +``--source-language-key`` + The language key of the default language + + + +Options +^^^^^^^ + +``--target-language-keys`` + Comma separated language keys for the target translations + + + + + .. _`Neos Command Reference: NEOS.MEDIA`: Package *NEOS.MEDIA* @@ -1834,6 +2067,8 @@ Options ``--preset`` Preset name, if provided only thumbnails matching that preset are cleared +``--quiet`` + If set, only errors will be displayed. @@ -1860,6 +2095,8 @@ Options Preset name, if not provided thumbnails are created for all presets ``--async`` Asynchronous generation, if not provided the setting ``Neos.Media.asyncThumbnails`` is used +``--quiet`` + If set, only errors will be displayed. @@ -1883,6 +2120,40 @@ Options ``--simulate`` If set, this command will only tell what it would do instead of doing it right away +``--quiet`` + + + + + + +.. _`Neos Command Reference: NEOS.MEDIA neos.media:media:removeunused`: + +``neos.media:media:removeunused`` +********************************* + +**Remove unused assets** + +This command iterates over all existing assets, checks their usage count and lists the assets which are not +reported as used by any AssetUsageStrategies. The unused assets can than be removed. + + + +Options +^^^^^^^ + +``--asset-source`` + If specified, only assets of this asset source are considered. For example "neos" or "my-asset-management-system +``--quiet`` + If set, only errors will be displayed. +``--assume-yes`` + If set, "yes" is assumed for the "shall I remove ..." dialogs +``--only-tags`` + Comma-separated list of asset tag labels, that should be taken into account +``--limit`` + Limit the result of unused assets displayed and removed for this run. +``--only-collections`` + Comma-separated list of asset collection titles, that should be taken into account @@ -1905,6 +2176,36 @@ Options ``--limit`` Limit the amount of thumbnails to be rendered to avoid memory exhaustion +``--quiet`` + If set, only errors will be displayed. + + + + + +.. _`Neos Command Reference: NEOS.MEDIA neos.media:media:rendervariants`: + +``neos.media:media:rendervariants`` +*********************************** + +**Render asset variants** + +Loops over missing configured asset variants and renders them. Optional ``limit`` parameter to +limit the amount of variants to be rendered to avoid memory exhaustion. + +If the re-render parameter is given, any existing variants will be rendered again, too. + + + +Options +^^^^^^^ + +``--limit`` + Limit the amount of variants to be rendered to avoid memory exhaustion +``--quiet`` + If set, only errors will be displayed. +``--recreate`` + If set, existing asset variants will be re-generated and replaced @@ -1921,7 +2222,7 @@ Package *NEOS.NEOS* ``neos.neos:domain:activate`` ***************************** -**Activate a domain record by hostname** +**Activate a domain record by hostname (with globbing)** @@ -1929,7 +2230,7 @@ Arguments ^^^^^^^^^ ``--hostname`` - The hostname to activate + The hostname to activate (globbing is supported) @@ -1950,7 +2251,7 @@ Arguments ^^^^^^^^^ ``--site-node-name`` - The nodeName of the site rootNode, e.g. "neostypo3org + The nodeName of the site rootNode, e.g. "flowneosio ``--hostname`` The hostname to match on, e.g. "flow.neos.io @@ -1973,7 +2274,7 @@ Options ``neos.neos:domain:deactivate`` ******************************* -**Deactivate a domain record by hostname** +**Deactivate a domain record by hostname (with globbing)** @@ -1981,7 +2282,7 @@ Arguments ^^^^^^^^^ ``--hostname`` - The hostname to deactivate + The hostname to deactivate (globbing is supported) @@ -1994,7 +2295,7 @@ Arguments ``neos.neos:domain:delete`` *************************** -**Delete a domain record by hostname** +**Delete a domain record by hostname (with globbing)** @@ -2002,7 +2303,7 @@ Arguments ^^^^^^^^^ ``--hostname`` - The hostname to remove + The hostname to remove (globbing is supported) @@ -2036,7 +2337,7 @@ Options ``neos.neos:site:activate`` *************************** -**Activate a site** +**Activate a site (with globbing)** This command activates the specified site. @@ -2044,7 +2345,7 @@ Arguments ^^^^^^^^^ ``--site-node`` - The node name of the site to activate + The node name of the sites to activate (globbing is supported) @@ -2062,13 +2363,12 @@ Arguments This command allows to create a blank site with just a single empty document in the default dimension. The name of the site, the packageKey must be specified. -If no ``nodeType`` option is specified the command will use `Neos.NodeTypes:Page` as fallback. The node type -must already exists and have the superType ``Neos.Neos:Document``. +The node type given with the ``nodeType`` option must already exists and have the superType ``Neos.Neos:Document``. -If no ``nodeName` option is specified the command will create a unique node-name from the name of the site. +If no ``nodeName`` option is specified the command will create a unique node-name from the name of the site. If a node name is given it has to be unique for the setup. -If the flag ``activate` is set to false new site will not be activated. +If the flag ``activate`` is set to false new site will not be activated. Arguments ^^^^^^^^^ @@ -2077,18 +2377,18 @@ Arguments The name of the site ``--package-key`` The site package +``--node-type`` + The node type to use for the site node, e.g. Amce.Com:Page Options ^^^^^^^ -``--node-type`` - The node type to use for the site node. (Default = Neos.NodeTypes:Page) ``--node-name`` The name of the site node. If no nodeName is given it will be determined from the siteName. ``--inactive`` - The new site is not activated immediately (default = false). + The new site is not activated immediately (default = false) @@ -2099,7 +2399,7 @@ Options ``neos.neos:site:deactivate`` ***************************** -**Deactivate a site** +**Deactivate a site (with globbing)** This command deactivates the specified site. @@ -2107,7 +2407,7 @@ Arguments ^^^^^^^^^ ``--site-node`` - The node name of the site to deactivate + The node name of the sites to deactivate (globbing is supported) @@ -2203,17 +2503,17 @@ Options ``neos.neos:site:prune`` ************************ -**Remove all content and related data - for now. In the future we need some more sophisticated cleanup.** +**Remove site with content and related data (with globbing)** +In the future we need some more sophisticated cleanup. +Arguments +^^^^^^^^^ +``--site-node`` + Name for site root nodes to clear only content of this sites (globbing is supported) -Options -^^^^^^^ - -``--site-node`` - Name of a site root node to clear only content of this site. @@ -2224,7 +2524,7 @@ Options ``neos.neos:user:activate`` *************************** -**Activate a user** +**Activate a user (with globbing)** This command reactivates possibly expired accounts for the given user. @@ -2236,7 +2536,7 @@ Arguments ^^^^^^^^^ ``--username`` - The username of the user to be activated. + The username of the user to be activated (globbing is supported) @@ -2270,7 +2570,7 @@ Arguments ^^^^^^^^^ ``--username`` - The username of the user + The username of the user (globbing is supported) ``--role`` Role to be added to the user, for example "Neos.Neos:Administrator" or just "Administrator @@ -2335,7 +2635,7 @@ Options ``neos.neos:user:deactivate`` ***************************** -**Deactivate a user** +**Deactivate a user (with globbing)** This command deactivates a user by flagging all of its accounts as expired. @@ -2347,7 +2647,7 @@ Arguments ^^^^^^^^^ ``--username`` - The username of the user to be deactivated. + The username of the user to be deactivated (globbing is supported) @@ -2366,7 +2666,7 @@ Options ``neos.neos:user:delete`` ************************* -**Delete a user** +**Delete a user (with globbing)** This command deletes an existing Neos user. All content and data directly related to this user, including but not limited to draft workspace contents, will be removed as well. @@ -2382,7 +2682,7 @@ Arguments ^^^^^^^^^ ``--username`` - The username of the user to be removed + The username of the user to be removed (globbing is supported) @@ -2430,7 +2730,7 @@ Arguments ^^^^^^^^^ ``--username`` - The username of the user + The username of the user (globbing is supported) ``--role`` Role to be removed from the user, for example "Neos.Neos:Administrator" or just "Administrator @@ -2607,39 +2907,6 @@ Options -.. _`Neos Command Reference: NEOS.NEOS neos.neos:workspace:discardall`: - -``neos.neos:workspace:discardall`` -********************************** - -**Discard changes in workspace <b>(DEPRECATED)</b>** - -This command discards all modified, created or deleted nodes in the specified workspace. - -Arguments -^^^^^^^^^ - -``--workspace-name`` - Name of the workspace, for example "user-john - - - -Options -^^^^^^^ - -``--verbose`` - If enabled, information about individual nodes will be displayed - - - -Related commands -^^^^^^^^^^^^^^^^ - -``neos.neos:workspace:discard`` - Discard changes in workspace - - - .. _`Neos Command Reference: NEOS.NEOS neos.neos:workspace:list`: ``neos.neos:workspace:list`` @@ -2687,39 +2954,6 @@ Options -.. _`Neos Command Reference: NEOS.NEOS neos.neos:workspace:publishall`: - -``neos.neos:workspace:publishall`` -********************************** - -**Publish changes of a workspace <b>(DEPRECATED)</b>** - -This command publishes all modified, created or deleted nodes in the specified workspace to the live workspace. - -Arguments -^^^^^^^^^ - -``--workspace-name`` - Name of the workspace, for example "user-john - - - -Options -^^^^^^^ - -``--verbose`` - If enabled, information about individual nodes will be displayed - - - -Related commands -^^^^^^^^^^^^^^^^ - -``neos.neos:workspace:publish`` - Publish changes of a workspace - - - .. _`Neos Command Reference: NEOS.NEOS neos.neos:workspace:rebase`: ``neos.neos:workspace:rebase`` diff --git a/Neos.Neos/Documentation/References/EelHelpersReference.rst b/Neos.Neos/Documentation/References/EelHelpersReference.rst index cc4fb4d5486..79acd948b5e 100644 --- a/Neos.Neos/Documentation/References/EelHelpersReference.rst +++ b/Neos.Neos/Documentation/References/EelHelpersReference.rst @@ -3,7 +3,7 @@ Eel Helpers Reference ===================== -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`Eel Helpers Reference: Api`: @@ -2036,14 +2036,15 @@ Replace occurrences of a search string inside the string Example:: String.replace("canal", "ana", "oo") == "cool" + String.replace("cool gridge", ["oo", "gri"], ["ana", "bri"]) == "canal bridge" Note: this method does not perform regular expression matching, @see pregReplace(). -* ``string`` (string) The input string -* ``search`` (string) A search string -* ``replace`` (string) A replacement string +* ``string`` (array|string|null) The input string +* ``search`` (array|string|null) A search string +* ``replace`` (array|string|null) A replacement string -**Return** (string) The string with all occurrences replaced +**Return** (array|string|string[]) The string with all occurrences replaced String.sha1(string) ^^^^^^^^^^^^^^^^^^^ diff --git a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst index d5e8781214e..582e91c9267 100644 --- a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst +++ b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst @@ -3,7 +3,7 @@ FlowQuery Operation Reference ============================= -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`FlowQuery Operation Reference: add`: diff --git a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst index 1f7c9b2e2b8..66dd6924281 100644 --- a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository Signals Reference ==================================== -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`Content Repository Signals Reference: Context (``Neos\ContentRepository\Domain\Service\Context``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Flow.rst b/Neos.Neos/Documentation/References/Signals/Flow.rst index 2c92fd5eed6..359257c7ed2 100644 --- a/Neos.Neos/Documentation/References/Signals/Flow.rst +++ b/Neos.Neos/Documentation/References/Signals/Flow.rst @@ -3,7 +3,7 @@ Flow Signals Reference ====================== -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`Flow Signals Reference: AbstractAdvice (``Neos\Flow\Aop\Advice\AbstractAdvice``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Media.rst b/Neos.Neos/Documentation/References/Signals/Media.rst index c731caf20f0..350cb44df2c 100644 --- a/Neos.Neos/Documentation/References/Signals/Media.rst +++ b/Neos.Neos/Documentation/References/Signals/Media.rst @@ -3,7 +3,7 @@ Media Signals Reference ======================= -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`Media Signals Reference: AssetCollectionController (``Neos\Media\Browser\Controller\AssetCollectionController``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Neos.rst b/Neos.Neos/Documentation/References/Signals/Neos.rst index e453470f856..937847a87a7 100644 --- a/Neos.Neos/Documentation/References/Signals/Neos.rst +++ b/Neos.Neos/Documentation/References/Signals/Neos.rst @@ -3,7 +3,7 @@ Neos Signals Reference ====================== -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`Neos Signals Reference: AbstractCreate (``Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate``)`: diff --git a/Neos.Neos/Documentation/References/Validators/Flow.rst b/Neos.Neos/Documentation/References/Validators/Flow.rst index b4f1db9548b..e4c5c45cf0f 100644 --- a/Neos.Neos/Documentation/References/Validators/Flow.rst +++ b/Neos.Neos/Documentation/References/Validators/Flow.rst @@ -3,7 +3,7 @@ Flow Validator Reference ======================== -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`Flow Validator Reference: AggregateBoundaryValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Media.rst b/Neos.Neos/Documentation/References/Validators/Media.rst index 2b9badece72..9e9407aff36 100644 --- a/Neos.Neos/Documentation/References/Validators/Media.rst +++ b/Neos.Neos/Documentation/References/Validators/Media.rst @@ -3,7 +3,7 @@ Media Validator Reference ========================= -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`Media Validator Reference: ImageOrientationValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Party.rst b/Neos.Neos/Documentation/References/Validators/Party.rst index f6e6cc52989..7f7479f57ad 100644 --- a/Neos.Neos/Documentation/References/Validators/Party.rst +++ b/Neos.Neos/Documentation/References/Validators/Party.rst @@ -3,7 +3,7 @@ Party Validator Reference ========================= -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`Party Validator Reference: AimAddressValidator`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst index 3708b9567e4..b073d7b8500 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository ViewHelper Reference ####################################### -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`Content Repository ViewHelper Reference: PaginateViewHelper`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst index 033b515e2d1..6f6aaf4574e 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst @@ -3,7 +3,7 @@ FluidAdaptor ViewHelper Reference ################################# -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`FluidAdaptor ViewHelper Reference: f:debug`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst index f6a1c13b1b6..032e57f64b7 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst @@ -3,7 +3,7 @@ Form ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`Form ViewHelper Reference: neos.form:form`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst index e74bb37cbc6..d578688b50b 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst @@ -3,7 +3,7 @@ Fusion ViewHelper Reference ########################### -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`Fusion ViewHelper Reference: fusion:render`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst index 2f1865ed761..d25b770036d 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst @@ -3,7 +3,7 @@ Media ViewHelper Reference ########################## -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`Media ViewHelper Reference: neos.media:fileTypeIcon`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst index e226405aeee..c5191e870e1 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst @@ -3,7 +3,7 @@ Neos ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`Neos ViewHelper Reference: neos:backend.authenticationProviderLabel`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst index 4e8b815047f..6a3a594c574 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst @@ -3,7 +3,7 @@ TYPO3 Fluid ViewHelper Reference ################################ -This reference was automatically generated from code on 2023-09-28 +This reference was automatically generated from code on 2023-10-21 .. _`TYPO3 Fluid ViewHelper Reference: f:alias`: From e8316fa904d7be0fd246643417b3bc1aa3514978 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Sat, 21 Oct 2023 09:52:46 +0000 Subject: [PATCH 08/53] TASK: Add changelog for 7.3.16 [skip ci] See https://jenkins.neos.io/job/neos-release/394/ --- .../Appendixes/ChangeLogs/7316.rst | 175 ++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 Neos.Neos/Documentation/Appendixes/ChangeLogs/7316.rst diff --git a/Neos.Neos/Documentation/Appendixes/ChangeLogs/7316.rst b/Neos.Neos/Documentation/Appendixes/ChangeLogs/7316.rst new file mode 100644 index 00000000000..512236f16b2 --- /dev/null +++ b/Neos.Neos/Documentation/Appendixes/ChangeLogs/7316.rst @@ -0,0 +1,175 @@ +`7.3.16 (2023-10-21) `_ +================================================================================================ + +Overview of merged pull requests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`BUGFIX: Only discard nodes in same workspace `_ +--------------------------------------------------------------------------------------------------------------- + +* Resolves: `#4577 `_ + +* Packages: ``ContentRepository`` + +`BUGFIX: Load all thumbnails for an asset to skip further requests `_ +------------------------------------------------------------------------------------------------------------------------------------ + +For the usecase of images with responsive variants this change prevents additional database requests for each additional variant of an image. + +This can greatly reduce the number of queries on pages with many source tags or sources attributes for pictures and images. + +**Review instructions** + +As soon as an image is rendered in several sizes on a page the patch should skip additional db requests in the thumbnails repository. +Persistent resources and image entities are still queried as via the node property getter and to resolve the thumbnail. + + +* Packages: ``Neos`` ``Media`` + +`BUGFIX: Allow unsetting thumbnail presets `_ +------------------------------------------------------------------------------------------------------------ + +* Resolves: `#3544 `_ + +* Packages: ``Neos`` ``Media`` + +`BUGFIX: Don’t query for abstract nodetypes in nodedata repository `_ +-------------------------------------------------------------------------------------------------------------------------------------- + +As abstract nodetypes don't (shouldn't) appear in the database it makes no sense to query them. + +This is a regression that was introduced a long time ago, when the default parameter to include abstract nodetypes was added to the ``getSubNodeTypes`` method in the ``NodeTypeManager`` without adjusting the call in the ``NodeDataRepository->getNodeTypeFilterConstraintsForDql`` which relied on the previous behaviour. + +The call in the method ``getNodeTypeFilterConstraints`` was fixed some years ago, but that method seems unused. + +* Packages: ``ContentRepository`` + +`BUGFIX: Consistently initialize asset sources via `createFromConfiguration` `_ +---------------------------------------------------------------------------------------------------------------------------------------------- + +fixes: `#3965 `_ + +**The Problem** + +The case at hand was an asset source that uses a value object to validate the incoming asset source options. I expected to be able to define a promoted constructor property with said value object as its declared type: + +```php +final class MyAssetSource implements AssetSourceInterface +{ + public function __construct( + private readonly string $assetSourceIdentifier, + private readonly Options $options + ) { + } + + /* ... */ +} +``` + +...and initialize the value object in the ``createFromConfiguration`` static factory method defined by the ``AssetSourceInterface``: + +```php +final class MyAssetSource implements AssetSourceInterface +{ + /* ... */ + + public static function createFromConfiguration(string $assetSourceIdentifier, array $assetSourceOptions): AssetSourceInterface + { + return new static( + $assetSourceIdentifier, + Options::fromArray($assetSourceOptions) + ); + } +} +``` + +This failed with a Type Error, because the ``AssetSourceService``, which is responsible for initializing asset sources, at one point does not utilize ``createFromConfiguration`` to perform initialization, but calls the asset source constructor directly: + +https://github.com/neos/neos-development-collection/blob/`a4791b623161259b31d2d11b343310bd7ef76507 `_/Neos.Media/Classes/Domain/Service/AssetSourceService.php#L178 + +**The Solution** + +I adjusted the aforementioned routine of the ``AssetSourceService`` to use the ``AssetSourceInterface``-defined ``createFromConfiguration`` static factory method instead of the asset source's constructor. + +Even though the pattern I described above only makes sense in a PHP >8.0 environment, I decided to target Neos 7.3 with this PR, because it should constitute a non-breaking bugfix. + +* Packages: ``Neos`` ``Media`` + +`BUGFIX: Guard that Fusion path cannot be empty `_ +----------------------------------------------------------------------------------------------------------------- + +Previously in php 7.4 this ``Neos\\Fusion\\Exception\\MissingFusionObjectException`` was thrown + +> No Fusion object found in path "" + +but with php 8 this ``ValueError`` is thrown which is unexpected + +> strrpos(): Argument `#3 ``_($offset) must be contained in argument ``#1 `_($haystack) + +This change takes care of throwing an explicit ``Neos\\Fusion\\Exception`` instead: + +> Fusion path cannot be empty. + + +-------- + +This error was noticed in the out of band rendering, when there is no content element wrapping: https://discuss.neos.io/t/argument-3-offset-must-be-contained-in-argument-1-haystack/6416/4 + +image + + + +**Upgrade instructions** + +**Review instructions** + + +* Packages: ``Neos`` ``Fusion`` + +`BUGFIX: Fix `NodeType` `getTypeOfAutoCreatedChildNode` and `getPropertyType` `_ +----------------------------------------------------------------------------------------------------------------------------------------------- + +resolves partially `#4333 `_ +resolves partially `#4344 `_ + +**Upgrade instructions** + +**Review instructions** + + +* Packages: ``Neos`` ``ContentRepository`` + +`TASK: Fix documentation builds `_ +------------------------------------------------------------------------------------------------- + +… by pinning updated dependencies. + +**Review instructions** + +Best is to see if the builds succeed on RTD again with this merged… + + +* Packages: ``Neos`` ``Media`` + +`TASK: Fix paths for Neos.Media RTD rendering setup `_ +--------------------------------------------------------------------------------------------------------------------- + +The paths need to be from the repo root, not relative to the ``.readthedocs.yaml`` file (it seems). + + +* Packages: ``Neos`` ``Media`` + +`TASK: Add configuration files for RTD `_ +-------------------------------------------------------------------------------------------------------- + +This add ``.readthedocs.yaml`` files for the collection (handling ``Neos.Neos``) and for ``neos.Media``, to solve failing documentation rendering. + +**Review instructions** + +This can be compared to the configuration we have in place for ``Neos.Flow`` in the Flow development collection. + + +* Packages: ``Media`` + +`Detailed log `_ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 58673f9f3f8dd815ccc4379329d6efeed492de0e Mon Sep 17 00:00:00 2001 From: Jenkins Date: Sat, 21 Oct 2023 09:58:46 +0000 Subject: [PATCH 09/53] TASK: Add changelog for 8.0.13 [skip ci] See https://jenkins.neos.io/job/neos-release/395/ --- .../Appendixes/ChangeLogs/8013.rst | 171 ++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 Neos.Neos/Documentation/Appendixes/ChangeLogs/8013.rst diff --git a/Neos.Neos/Documentation/Appendixes/ChangeLogs/8013.rst b/Neos.Neos/Documentation/Appendixes/ChangeLogs/8013.rst new file mode 100644 index 00000000000..a3f85f1db68 --- /dev/null +++ b/Neos.Neos/Documentation/Appendixes/ChangeLogs/8013.rst @@ -0,0 +1,171 @@ +`8.0.13 (2023-10-21) `_ +================================================================================================ + +Overview of merged pull requests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`BUGFIX: Only discard nodes in same workspace `_ +--------------------------------------------------------------------------------------------------------------- + +* Resolves: `#4577 `_ + +* Packages: ``ContentRepository`` + +`BUGFIX: Load all thumbnails for an asset to skip further requests `_ +------------------------------------------------------------------------------------------------------------------------------------ + +For the usecase of images with responsive variants this change prevents additional database requests for each additional variant of an image. + +This can greatly reduce the number of queries on pages with many source tags or sources attributes for pictures and images. + +**Review instructions** + +As soon as an image is rendered in several sizes on a page the patch should skip additional db requests in the thumbnails repository. +Persistent resources and image entities are still queried as via the node property getter and to resolve the thumbnail. + + +* Packages: ``Neos`` ``Media`` + +`BUGFIX: Allow unsetting thumbnail presets `_ +------------------------------------------------------------------------------------------------------------ + +* Resolves: `#3544 `_ + +* Packages: ``Neos`` ``Media`` + +`BUGFIX: Don’t query for abstract nodetypes in nodedata repository `_ +-------------------------------------------------------------------------------------------------------------------------------------- + +As abstract nodetypes don't (shouldn't) appear in the database it makes no sense to query them. + +This is a regression that was introduced a long time ago, when the default parameter to include abstract nodetypes was added to the ``getSubNodeTypes`` method in the ``NodeTypeManager`` without adjusting the call in the ``NodeDataRepository->getNodeTypeFilterConstraintsForDql`` which relied on the previous behaviour. + +The call in the method ``getNodeTypeFilterConstraints`` was fixed some years ago, but that method seems unused. + +* Packages: ``ContentRepository`` + +`BUGFIX: Consistently initialize asset sources via `createFromConfiguration` `_ +---------------------------------------------------------------------------------------------------------------------------------------------- + +fixes: `#3965 `_ + +**The Problem** + +The case at hand was an asset source that uses a value object to validate the incoming asset source options. I expected to be able to define a promoted constructor property with said value object as its declared type: + +```php +final class MyAssetSource implements AssetSourceInterface +{ + public function __construct( + private readonly string $assetSourceIdentifier, + private readonly Options $options + ) { + } + + /* ... */ +} +``` + +...and initialize the value object in the ``createFromConfiguration`` static factory method defined by the ``AssetSourceInterface``: + +```php +final class MyAssetSource implements AssetSourceInterface +{ + /* ... */ + + public static function createFromConfiguration(string $assetSourceIdentifier, array $assetSourceOptions): AssetSourceInterface + { + return new static( + $assetSourceIdentifier, + Options::fromArray($assetSourceOptions) + ); + } +} +``` + +This failed with a Type Error, because the ``AssetSourceService``, which is responsible for initializing asset sources, at one point does not utilize ``createFromConfiguration`` to perform initialization, but calls the asset source constructor directly: + +https://github.com/neos/neos-development-collection/blob/`a4791b623161259b31d2d11b343310bd7ef76507 `_/Neos.Media/Classes/Domain/Service/AssetSourceService.php#L178 + +**The Solution** + +I adjusted the aforementioned routine of the ``AssetSourceService`` to use the ``AssetSourceInterface``-defined ``createFromConfiguration`` static factory method instead of the asset source's constructor. + +Even though the pattern I described above only makes sense in a PHP >8.0 environment, I decided to target Neos 7.3 with this PR, because it should constitute a non-breaking bugfix. + +* Packages: ``Neos`` ``Media`` + +`BUGFIX: Guard that Fusion path cannot be empty `_ +----------------------------------------------------------------------------------------------------------------- + +Previously in php 7.4 this ``Neos\\Fusion\\Exception\\MissingFusionObjectException`` was thrown + +> No Fusion object found in path "" + +but with php 8 this ``ValueError`` is thrown which is unexpected + +> strrpos(): Argument `#3 ``_($offset) must be contained in argument ``#1 `_($haystack) + +This change takes care of throwing an explicit ``Neos\\Fusion\\Exception`` instead: + +> Fusion path cannot be empty. + + +-------- + +This error was noticed in the out of band rendering, when there is no content element wrapping: https://discuss.neos.io/t/argument-3-offset-must-be-contained-in-argument-1-haystack/6416/4 + +image + + + +**Upgrade instructions** + + +* Packages: ``Neos`` ``Fusion`` + +`BUGFIX: Fix `NodeType` `getTypeOfAutoCreatedChildNode` and `getPropertyType` `_ +----------------------------------------------------------------------------------------------------------------------------------------------- + +resolves partially `#4333 `_ +resolves partially `#4344 `_ + +**Upgrade instructions** + + +* Packages: ``Neos`` ``ContentRepository`` + +`TASK: Fix documentation builds `_ +------------------------------------------------------------------------------------------------- + +… by pinning updated dependencies. + +**Review instructions** + +Best is to see if the builds succeed on RTD again with this merged… + + +* Packages: ``Neos`` ``Media`` + +`TASK: Fix paths for Neos.Media RTD rendering setup `_ +--------------------------------------------------------------------------------------------------------------------- + +The paths need to be from the repo root, not relative to the ``.readthedocs.yaml`` file (it seems). + + +* Packages: ``Neos`` ``Media`` + +`TASK: Add configuration files for RTD `_ +-------------------------------------------------------------------------------------------------------- + +This add ``.readthedocs.yaml`` files for the collection (handling ``Neos.Neos``) and for ``neos.Media``, to solve failing documentation rendering. + +**Review instructions** + +This can be compared to the configuration we have in place for ``Neos.Flow`` in the Flow development collection. + + +* Packages: ``Media`` + +`Detailed log `_ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 2f86ef4234828147e9b5cc330ad20d80fc4bc7a2 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Sat, 21 Oct 2023 10:00:50 +0000 Subject: [PATCH 10/53] TASK: Update references [skip ci] --- Neos.Neos/Documentation/References/CommandReference.rst | 2 +- Neos.Neos/Documentation/References/EelHelpersReference.rst | 2 +- .../Documentation/References/FlowQueryOperationReference.rst | 2 +- .../Documentation/References/Signals/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/Signals/Flow.rst | 2 +- Neos.Neos/Documentation/References/Signals/Media.rst | 2 +- Neos.Neos/Documentation/References/Signals/Neos.rst | 2 +- Neos.Neos/Documentation/References/Validators/Flow.rst | 2 +- Neos.Neos/Documentation/References/Validators/Media.rst | 2 +- Neos.Neos/Documentation/References/Validators/Party.rst | 2 +- .../Documentation/References/ViewHelpers/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Form.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Media.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Neos.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Neos.Neos/Documentation/References/CommandReference.rst b/Neos.Neos/Documentation/References/CommandReference.rst index ea302e2d4cb..7ce67ac5624 100644 --- a/Neos.Neos/Documentation/References/CommandReference.rst +++ b/Neos.Neos/Documentation/References/CommandReference.rst @@ -19,7 +19,7 @@ commands that may be available, use:: ./flow help -The following reference was automatically generated from code on 2023-10-20 +The following reference was automatically generated from code on 2023-10-21 .. _`Neos Command Reference: NEOS.CONTENTREPOSITORY`: diff --git a/Neos.Neos/Documentation/References/EelHelpersReference.rst b/Neos.Neos/Documentation/References/EelHelpersReference.rst index b60677e0a6f..00005d0d80d 100644 --- a/Neos.Neos/Documentation/References/EelHelpersReference.rst +++ b/Neos.Neos/Documentation/References/EelHelpersReference.rst @@ -3,7 +3,7 @@ Eel Helpers Reference ===================== -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`Eel Helpers Reference: Api`: diff --git a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst index d949bb4de18..582e91c9267 100644 --- a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst +++ b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst @@ -3,7 +3,7 @@ FlowQuery Operation Reference ============================= -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`FlowQuery Operation Reference: add`: diff --git a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst index 6066b426820..66dd6924281 100644 --- a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository Signals Reference ==================================== -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`Content Repository Signals Reference: Context (``Neos\ContentRepository\Domain\Service\Context``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Flow.rst b/Neos.Neos/Documentation/References/Signals/Flow.rst index 384a2a03257..5895a7d401f 100644 --- a/Neos.Neos/Documentation/References/Signals/Flow.rst +++ b/Neos.Neos/Documentation/References/Signals/Flow.rst @@ -3,7 +3,7 @@ Flow Signals Reference ====================== -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`Flow Signals Reference: AbstractAdvice (``Neos\Flow\Aop\Advice\AbstractAdvice``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Media.rst b/Neos.Neos/Documentation/References/Signals/Media.rst index 0adc111a13e..350cb44df2c 100644 --- a/Neos.Neos/Documentation/References/Signals/Media.rst +++ b/Neos.Neos/Documentation/References/Signals/Media.rst @@ -3,7 +3,7 @@ Media Signals Reference ======================= -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`Media Signals Reference: AssetCollectionController (``Neos\Media\Browser\Controller\AssetCollectionController``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Neos.rst b/Neos.Neos/Documentation/References/Signals/Neos.rst index 019dfc2064e..d32d606fadd 100644 --- a/Neos.Neos/Documentation/References/Signals/Neos.rst +++ b/Neos.Neos/Documentation/References/Signals/Neos.rst @@ -3,7 +3,7 @@ Neos Signals Reference ====================== -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`Neos Signals Reference: AbstractCreate (``Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate``)`: diff --git a/Neos.Neos/Documentation/References/Validators/Flow.rst b/Neos.Neos/Documentation/References/Validators/Flow.rst index a45115fad9a..e4c5c45cf0f 100644 --- a/Neos.Neos/Documentation/References/Validators/Flow.rst +++ b/Neos.Neos/Documentation/References/Validators/Flow.rst @@ -3,7 +3,7 @@ Flow Validator Reference ======================== -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`Flow Validator Reference: AggregateBoundaryValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Media.rst b/Neos.Neos/Documentation/References/Validators/Media.rst index 9a60ca15e92..9e9407aff36 100644 --- a/Neos.Neos/Documentation/References/Validators/Media.rst +++ b/Neos.Neos/Documentation/References/Validators/Media.rst @@ -3,7 +3,7 @@ Media Validator Reference ========================= -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`Media Validator Reference: ImageOrientationValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Party.rst b/Neos.Neos/Documentation/References/Validators/Party.rst index 1d0d0d53826..7f7479f57ad 100644 --- a/Neos.Neos/Documentation/References/Validators/Party.rst +++ b/Neos.Neos/Documentation/References/Validators/Party.rst @@ -3,7 +3,7 @@ Party Validator Reference ========================= -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`Party Validator Reference: AimAddressValidator`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst index a1023b01e60..b073d7b8500 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository ViewHelper Reference ####################################### -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`Content Repository ViewHelper Reference: PaginateViewHelper`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst index 99a4e6fd91b..6f6aaf4574e 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst @@ -3,7 +3,7 @@ FluidAdaptor ViewHelper Reference ################################# -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`FluidAdaptor ViewHelper Reference: f:debug`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst index f1c98250199..032e57f64b7 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst @@ -3,7 +3,7 @@ Form ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`Form ViewHelper Reference: neos.form:form`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst index 89aefe324d1..d578688b50b 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst @@ -3,7 +3,7 @@ Fusion ViewHelper Reference ########################### -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`Fusion ViewHelper Reference: fusion:render`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst index fe5c732eec8..d25b770036d 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst @@ -3,7 +3,7 @@ Media ViewHelper Reference ########################## -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`Media ViewHelper Reference: neos.media:fileTypeIcon`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst index 95228159a5e..c5191e870e1 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst @@ -3,7 +3,7 @@ Neos ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`Neos ViewHelper Reference: neos:backend.authenticationProviderLabel`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst index def60af0c31..6a3a594c574 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst @@ -3,7 +3,7 @@ TYPO3 Fluid ViewHelper Reference ################################ -This reference was automatically generated from code on 2023-10-20 +This reference was automatically generated from code on 2023-10-21 .. _`TYPO3 Fluid ViewHelper Reference: f:alias`: From dcf83099ef1efc6afd48ee342601363eb7aaee99 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Sat, 21 Oct 2023 10:06:55 +0000 Subject: [PATCH 11/53] TASK: Add changelog for 8.1.8 [skip ci] See https://jenkins.neos.io/job/neos-release/396/ --- .../Appendixes/ChangeLogs/818.rst | 171 ++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 Neos.Neos/Documentation/Appendixes/ChangeLogs/818.rst diff --git a/Neos.Neos/Documentation/Appendixes/ChangeLogs/818.rst b/Neos.Neos/Documentation/Appendixes/ChangeLogs/818.rst new file mode 100644 index 00000000000..ee60cbb6212 --- /dev/null +++ b/Neos.Neos/Documentation/Appendixes/ChangeLogs/818.rst @@ -0,0 +1,171 @@ +`8.1.8 (2023-10-21) `_ +============================================================================================== + +Overview of merged pull requests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`BUGFIX: Only discard nodes in same workspace `_ +--------------------------------------------------------------------------------------------------------------- + +* Resolves: `#4577 `_ + +* Packages: ``ContentRepository`` + +`BUGFIX: Load all thumbnails for an asset to skip further requests `_ +------------------------------------------------------------------------------------------------------------------------------------ + +For the usecase of images with responsive variants this change prevents additional database requests for each additional variant of an image. + +This can greatly reduce the number of queries on pages with many source tags or sources attributes for pictures and images. + +**Review instructions** + +As soon as an image is rendered in several sizes on a page the patch should skip additional db requests in the thumbnails repository. +Persistent resources and image entities are still queried as via the node property getter and to resolve the thumbnail. + + +* Packages: ``Neos`` ``Media`` + +`BUGFIX: Allow unsetting thumbnail presets `_ +------------------------------------------------------------------------------------------------------------ + +* Resolves: `#3544 `_ + +* Packages: ``Neos`` ``Media`` + +`BUGFIX: Don’t query for abstract nodetypes in nodedata repository `_ +-------------------------------------------------------------------------------------------------------------------------------------- + +As abstract nodetypes don't (shouldn't) appear in the database it makes no sense to query them. + +This is a regression that was introduced a long time ago, when the default parameter to include abstract nodetypes was added to the ``getSubNodeTypes`` method in the ``NodeTypeManager`` without adjusting the call in the ``NodeDataRepository->getNodeTypeFilterConstraintsForDql`` which relied on the previous behaviour. + +The call in the method ``getNodeTypeFilterConstraints`` was fixed some years ago, but that method seems unused. + +* Packages: ``ContentRepository`` + +`BUGFIX: Consistently initialize asset sources via `createFromConfiguration` `_ +---------------------------------------------------------------------------------------------------------------------------------------------- + +fixes: `#3965 `_ + +**The Problem** + +The case at hand was an asset source that uses a value object to validate the incoming asset source options. I expected to be able to define a promoted constructor property with said value object as its declared type: + +```php +final class MyAssetSource implements AssetSourceInterface +{ + public function __construct( + private readonly string $assetSourceIdentifier, + private readonly Options $options + ) { + } + + /* ... */ +} +``` + +...and initialize the value object in the ``createFromConfiguration`` static factory method defined by the ``AssetSourceInterface``: + +```php +final class MyAssetSource implements AssetSourceInterface +{ + /* ... */ + + public static function createFromConfiguration(string $assetSourceIdentifier, array $assetSourceOptions): AssetSourceInterface + { + return new static( + $assetSourceIdentifier, + Options::fromArray($assetSourceOptions) + ); + } +} +``` + +This failed with a Type Error, because the ``AssetSourceService``, which is responsible for initializing asset sources, at one point does not utilize ``createFromConfiguration`` to perform initialization, but calls the asset source constructor directly: + +https://github.com/neos/neos-development-collection/blob/`a4791b623161259b31d2d11b343310bd7ef76507 `_/Neos.Media/Classes/Domain/Service/AssetSourceService.php#L178 + +**The Solution** + +I adjusted the aforementioned routine of the ``AssetSourceService`` to use the ``AssetSourceInterface``-defined ``createFromConfiguration`` static factory method instead of the asset source's constructor. + +Even though the pattern I described above only makes sense in a PHP >8.0 environment, I decided to target Neos 7.3 with this PR, because it should constitute a non-breaking bugfix. + +* Packages: ``Neos`` ``Media`` + +`BUGFIX: Guard that Fusion path cannot be empty `_ +----------------------------------------------------------------------------------------------------------------- + +Previously in php 7.4 this ``Neos\\Fusion\\Exception\\MissingFusionObjectException`` was thrown + +> No Fusion object found in path "" + +but with php 8 this ``ValueError`` is thrown which is unexpected + +> strrpos(): Argument `#3 ``_($offset) must be contained in argument ``#1 `_($haystack) + +This change takes care of throwing an explicit ``Neos\\Fusion\\Exception`` instead: + +> Fusion path cannot be empty. + + +-------- + +This error was noticed in the out of band rendering, when there is no content element wrapping: https://discuss.neos.io/t/argument-3-offset-must-be-contained-in-argument-1-haystack/6416/4 + +image + + + +**Upgrade instructions** + + +* Packages: ``Neos`` ``Fusion`` + +`BUGFIX: Fix `NodeType` `getTypeOfAutoCreatedChildNode` and `getPropertyType` `_ +----------------------------------------------------------------------------------------------------------------------------------------------- + +resolves partially `#4333 `_ +resolves partially `#4344 `_ + +**Upgrade instructions** + + +* Packages: ``Neos`` ``ContentRepository`` + +`TASK: Fix documentation builds `_ +------------------------------------------------------------------------------------------------- + +… by pinning updated dependencies. + +**Review instructions** + +Best is to see if the builds succeed on RTD again with this merged… + + +* Packages: ``Neos`` ``Media`` + +`TASK: Fix paths for Neos.Media RTD rendering setup `_ +--------------------------------------------------------------------------------------------------------------------- + +The paths need to be from the repo root, not relative to the ``.readthedocs.yaml`` file (it seems). + + +* Packages: ``Neos`` ``Media`` + +`TASK: Add configuration files for RTD `_ +-------------------------------------------------------------------------------------------------------- + +This add ``.readthedocs.yaml`` files for the collection (handling ``Neos.Neos``) and for ``neos.Media``, to solve failing documentation rendering. + +**Review instructions** + +This can be compared to the configuration we have in place for ``Neos.Flow`` in the Flow development collection. + + +* Packages: ``Media`` + +`Detailed log `_ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 5442ddd8f4410764d34dca5fe1b59aa87f2574a9 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Sat, 21 Oct 2023 10:13:28 +0000 Subject: [PATCH 12/53] TASK: Add changelog for 8.2.8 [skip ci] See https://jenkins.neos.io/job/neos-release/397/ --- .../Appendixes/ChangeLogs/828.rst | 171 ++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 Neos.Neos/Documentation/Appendixes/ChangeLogs/828.rst diff --git a/Neos.Neos/Documentation/Appendixes/ChangeLogs/828.rst b/Neos.Neos/Documentation/Appendixes/ChangeLogs/828.rst new file mode 100644 index 00000000000..7c8c2b227a9 --- /dev/null +++ b/Neos.Neos/Documentation/Appendixes/ChangeLogs/828.rst @@ -0,0 +1,171 @@ +`8.2.8 (2023-10-21) `_ +============================================================================================== + +Overview of merged pull requests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`BUGFIX: Only discard nodes in same workspace `_ +--------------------------------------------------------------------------------------------------------------- + +* Resolves: `#4577 `_ + +* Packages: ``ContentRepository`` + +`BUGFIX: Load all thumbnails for an asset to skip further requests `_ +------------------------------------------------------------------------------------------------------------------------------------ + +For the usecase of images with responsive variants this change prevents additional database requests for each additional variant of an image. + +This can greatly reduce the number of queries on pages with many source tags or sources attributes for pictures and images. + +**Review instructions** + +As soon as an image is rendered in several sizes on a page the patch should skip additional db requests in the thumbnails repository. +Persistent resources and image entities are still queried as via the node property getter and to resolve the thumbnail. + + +* Packages: ``Neos`` ``Media`` + +`BUGFIX: Allow unsetting thumbnail presets `_ +------------------------------------------------------------------------------------------------------------ + +* Resolves: `#3544 `_ + +* Packages: ``Neos`` ``Media`` + +`BUGFIX: Don’t query for abstract nodetypes in nodedata repository `_ +-------------------------------------------------------------------------------------------------------------------------------------- + +As abstract nodetypes don't (shouldn't) appear in the database it makes no sense to query them. + +This is a regression that was introduced a long time ago, when the default parameter to include abstract nodetypes was added to the ``getSubNodeTypes`` method in the ``NodeTypeManager`` without adjusting the call in the ``NodeDataRepository->getNodeTypeFilterConstraintsForDql`` which relied on the previous behaviour. + +The call in the method ``getNodeTypeFilterConstraints`` was fixed some years ago, but that method seems unused. + +* Packages: ``ContentRepository`` + +`BUGFIX: Consistently initialize asset sources via `createFromConfiguration` `_ +---------------------------------------------------------------------------------------------------------------------------------------------- + +fixes: `#3965 `_ + +**The Problem** + +The case at hand was an asset source that uses a value object to validate the incoming asset source options. I expected to be able to define a promoted constructor property with said value object as its declared type: + +```php +final class MyAssetSource implements AssetSourceInterface +{ + public function __construct( + private readonly string $assetSourceIdentifier, + private readonly Options $options + ) { + } + + /* ... */ +} +``` + +...and initialize the value object in the ``createFromConfiguration`` static factory method defined by the ``AssetSourceInterface``: + +```php +final class MyAssetSource implements AssetSourceInterface +{ + /* ... */ + + public static function createFromConfiguration(string $assetSourceIdentifier, array $assetSourceOptions): AssetSourceInterface + { + return new static( + $assetSourceIdentifier, + Options::fromArray($assetSourceOptions) + ); + } +} +``` + +This failed with a Type Error, because the ``AssetSourceService``, which is responsible for initializing asset sources, at one point does not utilize ``createFromConfiguration`` to perform initialization, but calls the asset source constructor directly: + +https://github.com/neos/neos-development-collection/blob/`a4791b623161259b31d2d11b343310bd7ef76507 `_/Neos.Media/Classes/Domain/Service/AssetSourceService.php#L178 + +**The Solution** + +I adjusted the aforementioned routine of the ``AssetSourceService`` to use the ``AssetSourceInterface``-defined ``createFromConfiguration`` static factory method instead of the asset source's constructor. + +Even though the pattern I described above only makes sense in a PHP >8.0 environment, I decided to target Neos 7.3 with this PR, because it should constitute a non-breaking bugfix. + +* Packages: ``Neos`` ``Media`` + +`BUGFIX: Guard that Fusion path cannot be empty `_ +----------------------------------------------------------------------------------------------------------------- + +Previously in php 7.4 this ``Neos\\Fusion\\Exception\\MissingFusionObjectException`` was thrown + +> No Fusion object found in path "" + +but with php 8 this ``ValueError`` is thrown which is unexpected + +> strrpos(): Argument `#3 ``_($offset) must be contained in argument ``#1 `_($haystack) + +This change takes care of throwing an explicit ``Neos\\Fusion\\Exception`` instead: + +> Fusion path cannot be empty. + + +-------- + +This error was noticed in the out of band rendering, when there is no content element wrapping: https://discuss.neos.io/t/argument-3-offset-must-be-contained-in-argument-1-haystack/6416/4 + +image + + + +**Upgrade instructions** + + +* Packages: ``Neos`` ``Fusion`` + +`BUGFIX: Fix `NodeType` `getTypeOfAutoCreatedChildNode` and `getPropertyType` `_ +----------------------------------------------------------------------------------------------------------------------------------------------- + +resolves partially `#4333 `_ +resolves partially `#4344 `_ + +**Upgrade instructions** + + +* Packages: ``Neos`` ``ContentRepository`` + +`TASK: Fix documentation builds `_ +------------------------------------------------------------------------------------------------- + +… by pinning updated dependencies. + +**Review instructions** + +Best is to see if the builds succeed on RTD again with this merged… + + +* Packages: ``Neos`` ``Media`` + +`TASK: Fix paths for Neos.Media RTD rendering setup `_ +--------------------------------------------------------------------------------------------------------------------- + +The paths need to be from the repo root, not relative to the ``.readthedocs.yaml`` file (it seems). + + +* Packages: ``Neos`` ``Media`` + +`TASK: Add configuration files for RTD `_ +-------------------------------------------------------------------------------------------------------- + +This add ``.readthedocs.yaml`` files for the collection (handling ``Neos.Neos``) and for ``neos.Media``, to solve failing documentation rendering. + +**Review instructions** + +This can be compared to the configuration we have in place for ``Neos.Flow`` in the Flow development collection. + + +* Packages: ``Media`` + +`Detailed log `_ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From fe7b14c0fb106a0a8f729c4022406a40e28aa78d Mon Sep 17 00:00:00 2001 From: Jenkins Date: Sat, 21 Oct 2023 10:20:16 +0000 Subject: [PATCH 13/53] TASK: Update references [skip ci] --- Neos.Neos/Documentation/References/CommandReference.rst | 2 +- Neos.Neos/Documentation/References/EelHelpersReference.rst | 2 +- .../Documentation/References/FlowQueryOperationReference.rst | 2 +- .../Documentation/References/Signals/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/Signals/Flow.rst | 2 +- Neos.Neos/Documentation/References/Signals/Media.rst | 2 +- Neos.Neos/Documentation/References/Signals/Neos.rst | 2 +- Neos.Neos/Documentation/References/Validators/Flow.rst | 2 +- Neos.Neos/Documentation/References/Validators/Media.rst | 2 +- Neos.Neos/Documentation/References/Validators/Party.rst | 2 +- .../Documentation/References/ViewHelpers/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Form.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Media.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Neos.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Neos.Neos/Documentation/References/CommandReference.rst b/Neos.Neos/Documentation/References/CommandReference.rst index c0596712596..ee73a6130ea 100644 --- a/Neos.Neos/Documentation/References/CommandReference.rst +++ b/Neos.Neos/Documentation/References/CommandReference.rst @@ -19,7 +19,7 @@ commands that may be available, use:: ./flow help -The following reference was automatically generated from code on 2023-10-14 +The following reference was automatically generated from code on 2023-10-21 .. _`Neos Command Reference: NEOS.CONTENTREPOSITORY`: diff --git a/Neos.Neos/Documentation/References/EelHelpersReference.rst b/Neos.Neos/Documentation/References/EelHelpersReference.rst index a9d41352199..ccb1506f3cc 100644 --- a/Neos.Neos/Documentation/References/EelHelpersReference.rst +++ b/Neos.Neos/Documentation/References/EelHelpersReference.rst @@ -3,7 +3,7 @@ Eel Helpers Reference ===================== -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Eel Helpers Reference: Api`: diff --git a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst index 447b2789610..582e91c9267 100644 --- a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst +++ b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst @@ -3,7 +3,7 @@ FlowQuery Operation Reference ============================= -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`FlowQuery Operation Reference: add`: diff --git a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst index 5d8d337ab11..66dd6924281 100644 --- a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository Signals Reference ==================================== -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Content Repository Signals Reference: Context (``Neos\ContentRepository\Domain\Service\Context``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Flow.rst b/Neos.Neos/Documentation/References/Signals/Flow.rst index 574b2383f18..359257c7ed2 100644 --- a/Neos.Neos/Documentation/References/Signals/Flow.rst +++ b/Neos.Neos/Documentation/References/Signals/Flow.rst @@ -3,7 +3,7 @@ Flow Signals Reference ====================== -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Flow Signals Reference: AbstractAdvice (``Neos\Flow\Aop\Advice\AbstractAdvice``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Media.rst b/Neos.Neos/Documentation/References/Signals/Media.rst index 07d83856e7c..350cb44df2c 100644 --- a/Neos.Neos/Documentation/References/Signals/Media.rst +++ b/Neos.Neos/Documentation/References/Signals/Media.rst @@ -3,7 +3,7 @@ Media Signals Reference ======================= -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Media Signals Reference: AssetCollectionController (``Neos\Media\Browser\Controller\AssetCollectionController``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Neos.rst b/Neos.Neos/Documentation/References/Signals/Neos.rst index 48587653f98..937847a87a7 100644 --- a/Neos.Neos/Documentation/References/Signals/Neos.rst +++ b/Neos.Neos/Documentation/References/Signals/Neos.rst @@ -3,7 +3,7 @@ Neos Signals Reference ====================== -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Neos Signals Reference: AbstractCreate (``Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate``)`: diff --git a/Neos.Neos/Documentation/References/Validators/Flow.rst b/Neos.Neos/Documentation/References/Validators/Flow.rst index 683898f185f..e4c5c45cf0f 100644 --- a/Neos.Neos/Documentation/References/Validators/Flow.rst +++ b/Neos.Neos/Documentation/References/Validators/Flow.rst @@ -3,7 +3,7 @@ Flow Validator Reference ======================== -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Flow Validator Reference: AggregateBoundaryValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Media.rst b/Neos.Neos/Documentation/References/Validators/Media.rst index 30d84bea30f..9e9407aff36 100644 --- a/Neos.Neos/Documentation/References/Validators/Media.rst +++ b/Neos.Neos/Documentation/References/Validators/Media.rst @@ -3,7 +3,7 @@ Media Validator Reference ========================= -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Media Validator Reference: ImageOrientationValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Party.rst b/Neos.Neos/Documentation/References/Validators/Party.rst index 6d51a82d932..7f7479f57ad 100644 --- a/Neos.Neos/Documentation/References/Validators/Party.rst +++ b/Neos.Neos/Documentation/References/Validators/Party.rst @@ -3,7 +3,7 @@ Party Validator Reference ========================= -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Party Validator Reference: AimAddressValidator`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst index 54a805fba69..b073d7b8500 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository ViewHelper Reference ####################################### -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Content Repository ViewHelper Reference: PaginateViewHelper`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst index 2bba73fe9cd..6f6aaf4574e 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst @@ -3,7 +3,7 @@ FluidAdaptor ViewHelper Reference ################################# -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`FluidAdaptor ViewHelper Reference: f:debug`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst index f03a66dd3b4..032e57f64b7 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst @@ -3,7 +3,7 @@ Form ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Form ViewHelper Reference: neos.form:form`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst index 7e70388c7b9..d578688b50b 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst @@ -3,7 +3,7 @@ Fusion ViewHelper Reference ########################### -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Fusion ViewHelper Reference: fusion:render`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst index 162af432765..d25b770036d 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst @@ -3,7 +3,7 @@ Media ViewHelper Reference ########################## -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Media ViewHelper Reference: neos.media:fileTypeIcon`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst index 5d2129451e5..c5191e870e1 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst @@ -3,7 +3,7 @@ Neos ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`Neos ViewHelper Reference: neos:backend.authenticationProviderLabel`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst index 36ca8d3ae18..6a3a594c574 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst @@ -3,7 +3,7 @@ TYPO3 Fluid ViewHelper Reference ################################ -This reference was automatically generated from code on 2023-10-14 +This reference was automatically generated from code on 2023-10-21 .. _`TYPO3 Fluid ViewHelper Reference: f:alias`: From d738b9041ffc9777220e47a069c939b74a82778e Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Wed, 25 Oct 2023 15:45:02 +0200 Subject: [PATCH 14/53] TASK: Remove legacy `unstructured` node type --- Neos.Neos/NodeTypes/Unstructured.yaml | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 Neos.Neos/NodeTypes/Unstructured.yaml diff --git a/Neos.Neos/NodeTypes/Unstructured.yaml b/Neos.Neos/NodeTypes/Unstructured.yaml deleted file mode 100644 index 91b17e7d48e..00000000000 --- a/Neos.Neos/NodeTypes/Unstructured.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# legacy type for nodes without type -'unstructured': - constraints: - nodeTypes: - '*': true From 50e8ff69eaeb36d4b2bed42deb6a4d30b24ebccc Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Thu, 26 Oct 2023 08:29:25 +0200 Subject: [PATCH 15/53] TASK: Remove `'unstructured': {}` NodeType declaration from behat tests --- .../Tests/Behavior/Features/Assets.feature | 1 - .../Tests/Behavior/Features/Basic.feature | 1 - .../Tests/Behavior/Features/Errors.feature | 1 - .../Tests/Behavior/Features/References.feature | 1 - .../Tests/Behavior/Features/Variants.feature | 1 - 5 files changed, 5 deletions(-) diff --git a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Assets.feature b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Assets.feature index bc5cf9671ea..f4ca3e07455 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Assets.feature +++ b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Assets.feature @@ -7,7 +7,6 @@ Feature: Export of used Assets, Image Variants and Persistent Resources | language | en | en, de, ch | ch->de | And using the following node types: """yaml - 'unstructured': {} 'Neos.Neos:Site': {} 'Some.Package:Homepage': superTypes: diff --git a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Basic.feature b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Basic.feature index 3623e2fe61a..a1dea4af085 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Basic.feature +++ b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Basic.feature @@ -5,7 +5,6 @@ Feature: Simple migrations without content dimensions Given using no content dimensions And using the following node types: """yaml - 'unstructured': {} 'Neos.Neos:Site': {} 'Some.Package:Homepage': superTypes: diff --git a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Errors.feature b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Errors.feature index 4cf57e96a4c..33af167cd03 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Errors.feature +++ b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Errors.feature @@ -5,7 +5,6 @@ Feature: Exceptional cases during migrations Given using no content dimensions And using the following node types: """yaml - 'unstructured': {} 'Neos.Neos:Site': {} 'Some.Package:Homepage': superTypes: diff --git a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/References.feature b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/References.feature index 7c67812eb50..52e659f6017 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/References.feature +++ b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/References.feature @@ -5,7 +5,6 @@ Feature: Migrations that contain nodes with "reference" or "references propertie Given using no content dimensions And using the following node types: """yaml - 'unstructured': {} 'Neos.Neos:Site': {} 'Some.Package:Homepage': superTypes: diff --git a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Variants.feature b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Variants.feature index e6285a44323..a0e35e8fc92 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Variants.feature +++ b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Variants.feature @@ -7,7 +7,6 @@ Feature: Migrating nodes with content dimensions | language | en | en, de, ch | ch->de | And using the following node types: """yaml - 'unstructured': {} 'Neos.Neos:Site': {} 'Some.Package:Homepage': superTypes: From 13b6f2af0b33e4509bfa018c88225f24cce4af58 Mon Sep 17 00:00:00 2001 From: Manuel Meister Date: Thu, 26 Oct 2023 11:55:24 +0200 Subject: [PATCH 16/53] BUGFIX: Fix typos in deprecated Fusion object reference Fix broken references introduced in #4537 --- .../Documentation/References/NeosFusionReference.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Neos.Neos/Documentation/References/NeosFusionReference.rst b/Neos.Neos/Documentation/References/NeosFusionReference.rst index af991b249d7..bd125203351 100644 --- a/Neos.Neos/Documentation/References/NeosFusionReference.rst +++ b/Neos.Neos/Documentation/References/NeosFusionReference.rst @@ -1470,7 +1470,7 @@ Built a URI to a controller action :argumentsToBeExcludedFromQueryString: (array) Query parameters to exclude for ``addQueryString`` :absolute: (boolean) Whether to create an absolute URI -.. note:: The use of ``Neos.Fusion:UriBuilder`` is deprecated. Use :ref:`_Neos_Fusion__ActionUri` instead. +.. note:: The use of ``Neos.Fusion:UriBuilder`` is deprecated. Use :ref:`Neos_Fusion__ActionUri` instead. Example:: @@ -1486,15 +1486,15 @@ Removed Fusion Prototypes The following Fusion Prototypes have been removed: .. _Neos_Fusion__Array: -* `Neos.Fusion:Array` replaced with :ref:`_Neos_Fusion__Join` +* `Neos.Fusion:Array` replaced with :ref:`Neos_Fusion__Join` .. _Neos_Fusion__RawArray: -* `Neos.Fusion:RawArray` replaced with :ref:`_Neos_Fusion__DataStructure` +* `Neos.Fusion:RawArray` replaced with :ref:`Neos_Fusion__DataStructure` .. _Neos_Fusion__Collection: -* `Neos.Fusion:Collection` replaced with :ref:`_Neos_Fusion__Loop` +* `Neos.Fusion:Collection` replaced with :ref:`Neos_Fusion__Loop` .. _Neos_Fusion__RawCollection: -* `Neos.Fusion:RawCollection` replaced with :ref:`_Neos_Fusion__Map` +* `Neos.Fusion:RawCollection` replaced with :ref:`Neos_Fusion__Map` .. _Neos_Fusion__Attributes: -* `Neos.Fusion:Attributes` use property `attributes` in :ref:`_Neos_Fusion__Tag` +* `Neos.Fusion:Attributes` use property `attributes` in :ref:`Neos_Fusion__Tag` From 9fce857f72e3ba60bf45732e3afd1637743c0434 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:47:35 +0200 Subject: [PATCH 17/53] TASK: Legacy Asset extractor, handle if "unstructured" nodetype is not available --- .../Classes/NodeDataToAssetsProcessor.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToAssetsProcessor.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToAssetsProcessor.php index a1495d6174e..6f67d5ea3bf 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToAssetsProcessor.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToAssetsProcessor.php @@ -36,15 +36,15 @@ public function run(): ProcessorResult $numberOfErrors = 0; foreach ($this->nodeDataRows as $nodeDataRow) { $nodeTypeName = NodeTypeName::fromString($nodeDataRow['nodetype']); - try { + if ($this->nodeTypeManager->hasNodeType($nodeTypeName)) { $nodeType = $this->nodeTypeManager->getNodeType($nodeTypeName); - } catch (NodeTypeNotFoundException $exception) { - $numberOfErrors ++; - $this->dispatch(Severity::ERROR, '%s. Node: "%s"', $exception->getMessage(), $nodeDataRow['identifier']); - continue; + foreach ($nodeType->getProperties() as $nodeTypePropertyName => $nodeTypePropertyValue) { + $propertyTypes[$nodeTypePropertyName] = $nodeTypePropertyValue['type'] ?? null; + } + } else { + $this->dispatch(Severity::WARNING, 'The node type "%s" of node "%s" is not available. Falling back to "string" typed properties.', $nodeTypeName->value, $nodeDataRow['identifier']); + $propertyTypes = []; } - // HACK the following line is required in order to fully initialize the node type - $nodeType->getFullConfiguration(); try { $properties = json_decode($nodeDataRow['properties'], true, 512, JSON_THROW_ON_ERROR); } catch (\JsonException $exception) { @@ -53,7 +53,7 @@ public function run(): ProcessorResult continue; } foreach ($properties as $propertyName => $propertyValue) { - $propertyType = $nodeType->getPropertyType($propertyName); + $propertyType = $propertyTypes[$propertyName] ?? 'string'; // string is the fallback, in case the property is not defined or the node type does not exist. foreach ($this->extractAssetIdentifiers($propertyType, $propertyValue) as $assetId) { if (array_key_exists($assetId, $this->processedAssetIds)) { continue; From c49a1a8a48ff928b07f2ac551e0bd49e12018c49 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Mon, 30 Oct 2023 10:11:17 +0000 Subject: [PATCH 18/53] TASK: Update references [skip ci] --- Neos.Neos/Documentation/References/CommandReference.rst | 2 +- Neos.Neos/Documentation/References/EelHelpersReference.rst | 2 +- .../Documentation/References/FlowQueryOperationReference.rst | 2 +- .../Documentation/References/Signals/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/Signals/Flow.rst | 2 +- Neos.Neos/Documentation/References/Signals/Media.rst | 2 +- Neos.Neos/Documentation/References/Signals/Neos.rst | 2 +- Neos.Neos/Documentation/References/Validators/Flow.rst | 2 +- Neos.Neos/Documentation/References/Validators/Media.rst | 2 +- Neos.Neos/Documentation/References/Validators/Party.rst | 2 +- .../Documentation/References/ViewHelpers/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Form.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Media.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Neos.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Neos.Neos/Documentation/References/CommandReference.rst b/Neos.Neos/Documentation/References/CommandReference.rst index 7ce67ac5624..db800a743dd 100644 --- a/Neos.Neos/Documentation/References/CommandReference.rst +++ b/Neos.Neos/Documentation/References/CommandReference.rst @@ -19,7 +19,7 @@ commands that may be available, use:: ./flow help -The following reference was automatically generated from code on 2023-10-21 +The following reference was automatically generated from code on 2023-10-30 .. _`Neos Command Reference: NEOS.CONTENTREPOSITORY`: diff --git a/Neos.Neos/Documentation/References/EelHelpersReference.rst b/Neos.Neos/Documentation/References/EelHelpersReference.rst index 00005d0d80d..ef9a41d5ec3 100644 --- a/Neos.Neos/Documentation/References/EelHelpersReference.rst +++ b/Neos.Neos/Documentation/References/EelHelpersReference.rst @@ -3,7 +3,7 @@ Eel Helpers Reference ===================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`Eel Helpers Reference: Api`: diff --git a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst index 582e91c9267..b00941e25fb 100644 --- a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst +++ b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst @@ -3,7 +3,7 @@ FlowQuery Operation Reference ============================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`FlowQuery Operation Reference: add`: diff --git a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst index 66dd6924281..427e9499787 100644 --- a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository Signals Reference ==================================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`Content Repository Signals Reference: Context (``Neos\ContentRepository\Domain\Service\Context``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Flow.rst b/Neos.Neos/Documentation/References/Signals/Flow.rst index 5895a7d401f..5cc7411beb5 100644 --- a/Neos.Neos/Documentation/References/Signals/Flow.rst +++ b/Neos.Neos/Documentation/References/Signals/Flow.rst @@ -3,7 +3,7 @@ Flow Signals Reference ====================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`Flow Signals Reference: AbstractAdvice (``Neos\Flow\Aop\Advice\AbstractAdvice``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Media.rst b/Neos.Neos/Documentation/References/Signals/Media.rst index 350cb44df2c..b86f113cb4f 100644 --- a/Neos.Neos/Documentation/References/Signals/Media.rst +++ b/Neos.Neos/Documentation/References/Signals/Media.rst @@ -3,7 +3,7 @@ Media Signals Reference ======================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`Media Signals Reference: AssetCollectionController (``Neos\Media\Browser\Controller\AssetCollectionController``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Neos.rst b/Neos.Neos/Documentation/References/Signals/Neos.rst index d32d606fadd..d67b163e8d5 100644 --- a/Neos.Neos/Documentation/References/Signals/Neos.rst +++ b/Neos.Neos/Documentation/References/Signals/Neos.rst @@ -3,7 +3,7 @@ Neos Signals Reference ====================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`Neos Signals Reference: AbstractCreate (``Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate``)`: diff --git a/Neos.Neos/Documentation/References/Validators/Flow.rst b/Neos.Neos/Documentation/References/Validators/Flow.rst index e4c5c45cf0f..be27b8852ad 100644 --- a/Neos.Neos/Documentation/References/Validators/Flow.rst +++ b/Neos.Neos/Documentation/References/Validators/Flow.rst @@ -3,7 +3,7 @@ Flow Validator Reference ======================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`Flow Validator Reference: AggregateBoundaryValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Media.rst b/Neos.Neos/Documentation/References/Validators/Media.rst index 9e9407aff36..daa32be4523 100644 --- a/Neos.Neos/Documentation/References/Validators/Media.rst +++ b/Neos.Neos/Documentation/References/Validators/Media.rst @@ -3,7 +3,7 @@ Media Validator Reference ========================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`Media Validator Reference: ImageOrientationValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Party.rst b/Neos.Neos/Documentation/References/Validators/Party.rst index 7f7479f57ad..019af82d8bb 100644 --- a/Neos.Neos/Documentation/References/Validators/Party.rst +++ b/Neos.Neos/Documentation/References/Validators/Party.rst @@ -3,7 +3,7 @@ Party Validator Reference ========================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`Party Validator Reference: AimAddressValidator`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst index b073d7b8500..63b58bea995 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository ViewHelper Reference ####################################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`Content Repository ViewHelper Reference: PaginateViewHelper`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst index 6f6aaf4574e..aaa1ecd7da7 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst @@ -3,7 +3,7 @@ FluidAdaptor ViewHelper Reference ################################# -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`FluidAdaptor ViewHelper Reference: f:debug`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst index 032e57f64b7..97f22e73474 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst @@ -3,7 +3,7 @@ Form ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`Form ViewHelper Reference: neos.form:form`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst index d578688b50b..ac0f131011f 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst @@ -3,7 +3,7 @@ Fusion ViewHelper Reference ########################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`Fusion ViewHelper Reference: fusion:render`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst index d25b770036d..2088e00139b 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst @@ -3,7 +3,7 @@ Media ViewHelper Reference ########################## -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`Media ViewHelper Reference: neos.media:fileTypeIcon`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst index c5191e870e1..ca89fd6aa87 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst @@ -3,7 +3,7 @@ Neos ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`Neos ViewHelper Reference: neos:backend.authenticationProviderLabel`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst index 6a3a594c574..75758d9a5d4 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst @@ -3,7 +3,7 @@ TYPO3 Fluid ViewHelper Reference ################################ -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-10-30 .. _`TYPO3 Fluid ViewHelper Reference: f:alias`: From 2a71f73d96fb14e5453fb6a412f4a97e19d12092 Mon Sep 17 00:00:00 2001 From: Martin Ficzel Date: Sun, 29 Oct 2023 21:01:35 +0100 Subject: [PATCH 19/53] TASK: Remove Template from `Neos.Neos:Page`-`body` The page body was by default initialized as a Template with assigned default values. Those defaults caused issues when the body was redefined as a different component or a Join. The PR adjusts the body to a `Neos.Fusion:Join` similar to the `head` of the page. --- .../Documentation/References/NeosFusionReference.rst | 4 +--- .../Resources/Private/Fusion/Prototypes/Page.fusion | 9 +++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Neos.Neos/Documentation/References/NeosFusionReference.rst b/Neos.Neos/Documentation/References/NeosFusionReference.rst index 742e8445eef..58d3a67e902 100644 --- a/Neos.Neos/Documentation/References/NeosFusionReference.rst +++ b/Neos.Neos/Documentation/References/NeosFusionReference.rst @@ -741,12 +741,10 @@ into rendering a page; responsible for rendering the ```` tag and everythi :head.titleTag: (:ref:`Neos_Fusion__Tag`) The ```` tag :head.javascripts: (:ref:`Neos_Fusion__Join`) Script includes in the head should go here :head.stylesheets: (:ref:`Neos_Fusion__Join`) Link tags for stylesheets in the head should go here -:body.templatePath: (string) Path to a fluid template for the page body :bodyTag: (:ref:`Neos_Fusion__Tag`) The opening ``<body>`` tag :bodyTag.attributes: (:ref:`Neos_Fusion__DataStructure`) Attributes for the ``<body>`` tag -:body: (:ref:`Neos_Fusion__Template`) HTML markup for the ``<body>`` tag +:body: (:ref:`Neos_Fusion__Join`) HTML markup for the ``<body>`` tag. :body.javascripts: (:ref:`Neos_Fusion__Join`) Body footer JavaScript includes -:body.[key]: (mixed) Body template variables Examples: ^^^^^^^^^ diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/Page.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/Page.fusion index b0cdf9685c0..b60602bcf73 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/Page.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/Page.fusion @@ -68,15 +68,12 @@ prototype(Neos.Neos:Page) < prototype(Neos.Fusion:Http.Message) { } # Content of the body tag. To be defined by the integrator. - body = Neos.Fusion:Template { + body = Neos.Fusion:Join { @position = 'after bodyTag' - node = ${node} - site = ${site} - # Script includes before the closing body tag should go here + # Scripts before the closing body tag javascripts = Neos.Fusion:Join - # This processor appends the rendered javascripts Array to the rendered template - @process.appendJavaScripts = ${value + this.javascripts} + javascripts.@position = 'end 100' } closingBodyTag = '</body>' From 32d1b9c518f671d7957dbdfdcae4a0d479d74937 Mon Sep 17 00:00:00 2001 From: Bernhard Schmitt <schmitt@sitegeist.de> Date: Mon, 30 Oct 2023 16:57:10 +0100 Subject: [PATCH 20/53] 4343 - Apply constraint checks to ChangeNodeAggregateName --- ...moveNodeAggregate_ConstraintChecks.feature | 38 +++++----- ...NodeAggregateName_ConstraintChecks.feature | 73 +++++++++++++++++++ .../Feature/NodeRenaming/NodeRenaming.php | 15 +++- .../Bootstrap/Features/NodeRenaming.php | 40 +++++++++- 4 files changed, 144 insertions(+), 22 deletions(-) create mode 100644 Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRenaming/01_ChangeNodeAggregateName_ConstraintChecks.feature diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/01-RemoveNodeAggregate_ConstraintChecks.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/01-RemoveNodeAggregate_ConstraintChecks.feature index 970c803e274..53561be51c4 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/01-RemoveNodeAggregate_ConstraintChecks.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/07-NodeRemoval/01-RemoveNodeAggregate_ConstraintChecks.feature @@ -21,27 +21,27 @@ Feature: Remove NodeAggregate And I am in content repository "default" And I am user identified by "initiating-user-identifier" And the command CreateRootWorkspace is executed with payload: - | Key | Value | - | workspaceName | "live" | - | workspaceTitle | "Live" | - | workspaceDescription | "The live workspace" | - | newContentStreamId | "cs-identifier" | + | Key | Value | + | workspaceName | "live" | + | workspaceTitle | "Live" | + | workspaceDescription | "The live workspace" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And I am in content stream "cs-identifier" and dimension space point {"language":"de"} And the command CreateRootNodeAggregateWithNode is executed with payload: - | Key | Value | + | Key | Value | | nodeAggregateId | "lady-eleonode-rootford" | - | nodeTypeName | "Neos.ContentRepository:Root" | + | nodeTypeName | "Neos.ContentRepository:Root" | And the graph projection is fully up to date And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | tetheredDescendantNodeAggregateIds | - | sir-david-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | {"tethered":"nodewyn-tetherton"} | + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | tetheredDescendantNodeAggregateIds | + | sir-david-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | {"tethered":"nodewyn-tetherton"} | Scenario: Try to remove a node aggregate in a non-existing content stream When the command RemoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | contentStreamId | "i-do-not-exist" | - | nodeAggregateId | "sir-david-nodenborough" | + | contentStreamId | "i-do-not-exist" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "ContentStreamDoesNotExistYet" @@ -49,7 +49,7 @@ Feature: Remove NodeAggregate Scenario: Try to remove a non-existing node aggregate When the command RemoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateId | "i-do-not-exist" | + | nodeAggregateId | "i-do-not-exist" | | coveredDimensionSpacePoint | {"language":"de"} | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" @@ -57,7 +57,7 @@ Feature: Remove NodeAggregate Scenario: Try to remove a tethered node aggregate When the command RemoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateId | "nodewyn-tetherton" | + | nodeAggregateId | "nodewyn-tetherton" | | nodeVariantSelectionStrategy | "allVariants" | | coveredDimensionSpacePoint | {"language":"de"} | Then the last command should have thrown an exception of type "TetheredNodeAggregateCannotBeRemoved" @@ -65,23 +65,23 @@ Feature: Remove NodeAggregate Scenario: Try to remove a node aggregate in a non-existing dimension space point When the command RemoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateId | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | coveredDimensionSpacePoint | {"undeclared": "undefined"} | | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "DimensionSpacePointNotFound" Scenario: Try to remove a node aggregate in a dimension space point the node aggregate does not cover When the command RemoveNodeAggregate is executed with payload and exceptions are caught: - | Key | Value | - | nodeAggregateId | "sir-david-nodenborough" | - | coveredDimensionSpacePoint | {"language": "en"} | - | nodeVariantSelectionStrategy | "allVariants" | + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | coveredDimensionSpacePoint | {"language": "en"} | + | nodeVariantSelectionStrategy | "allVariants" | Then the last command should have thrown an exception of type "NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint" Scenario: Try to remove a node aggregate using a non-existent removalAttachmentPoint When the command RemoveNodeAggregate is executed with payload and exceptions are caught: | Key | Value | - | nodeAggregateId | "sir-david-nodenborough" | + | nodeAggregateId | "sir-david-nodenborough" | | nodeVariantSelectionStrategy | "allVariants" | | coveredDimensionSpacePoint | {"language":"de"} | | removalAttachmentPoint | "i-do-not-exist" | diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRenaming/01_ChangeNodeAggregateName_ConstraintChecks.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRenaming/01_ChangeNodeAggregateName_ConstraintChecks.feature new file mode 100644 index 00000000000..613c3bb4213 --- /dev/null +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeRenaming/01_ChangeNodeAggregateName_ConstraintChecks.feature @@ -0,0 +1,73 @@ +@contentrepository @adapters=DoctrineDBAL +Feature: Change node name + + As a user of the CR I want to change the name of a hierarchical relation between two nodes (e.g. in taxonomies) + + These are the base test cases for the NodeAggregateCommandHandler to block invalid commands. + + Background: + Given using no content dimensions + And using the following node types: + """yaml + 'Neos.ContentRepository.Testing:Content': [] + 'Neos.ContentRepository.Testing:Document': + childNodes: + tethered: + type: 'Neos.ContentRepository.Testing:Content' + """ + And using identifier "default", I define a content repository + And I am in content repository "default" + And the command CreateRootWorkspace is executed with payload: + | Key | Value | + | workspaceName | "live" | + | workspaceTitle | "Live" | + | workspaceDescription | "The live workspace" | + | newContentStreamId | "cs-identifier" | + And the graph projection is fully up to date + And I am in content stream "cs-identifier" and dimension space point {} + + And the command CreateRootNodeAggregateWithNode is executed with payload: + | Key | Value | + | nodeAggregateId | "lady-eleonode-rootford" | + | nodeTypeName | "Neos.ContentRepository:Root" | + And the graph projection is fully up to date + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | nodeTypeName | parentNodeAggregateId | initialPropertyValues | tetheredDescendantNodeAggregateIds | + | sir-david-nodenborough | null | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | {} | {"tethered": "nodewyn-tetherton"} | + | nody-mc-nodeface | occupied | Neos.ContentRepository.Testing:Document | sir-david-nodenborough | {} | {} | + + Scenario: Try to rename a node aggregate in a non-existing content stream + When the command ChangeNodeAggregateName is executed with payload and exceptions are caught: + | Key | Value | + | contentStreamId | "i-do-not-exist" | + | nodeAggregateId | "sir-david-nodenborough" | + | newNodeName | "new-name" | + Then the last command should have thrown an exception of type "ContentStreamDoesNotExistYet" + + Scenario: Try to rename a non-existing node aggregate + When the command ChangeNodeAggregateName is executed with payload and exceptions are caught: + | Key | Value | + | nodeAggregateId | "i-do-not-exist" | + | newNodeName | "new-name" | + Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist" + + Scenario: Try to rename a root node aggregate + When the command ChangeNodeAggregateName is executed with payload and exceptions are caught: + | Key | Value | + | nodeAggregateId | "lady-eleonode-rootford" | + | newNodeName | "new-name" | + Then the last command should have thrown an exception of type "NodeAggregateIsRoot" + + Scenario: Try to rename a tethered node aggregate + When the command ChangeNodeAggregateName is executed with payload and exceptions are caught: + | Key | Value | + | nodeAggregateId | "nodewyn-tetherton" | + | newNodeName | "new-name" | + Then the last command should have thrown an exception of type "NodeAggregateIsTethered" + + Scenario: Try to rename a node aggregate using an already occupied name + When the command ChangeNodeAggregateName is executed with payload and exceptions are caught: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | newNodeName | "tethered" | + Then the last command should have thrown an exception of type "NodeNameIsAlreadyOccupied" diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/NodeRenaming.php b/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/NodeRenaming.php index b4e3e85049c..9c04390f074 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/NodeRenaming.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/NodeRenaming.php @@ -15,6 +15,7 @@ namespace Neos\ContentRepository\Core\Feature\NodeRenaming; use Neos\ContentRepository\Core\ContentRepository; +use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\EventStore\Events; use Neos\ContentRepository\Core\EventStore\EventsToPublish; use Neos\ContentRepository\Core\Feature\Common\ConstraintChecks; @@ -33,7 +34,6 @@ trait NodeRenaming private function handleChangeNodeAggregateName(ChangeNodeAggregateName $command, ContentRepository $contentRepository): EventsToPublish { - $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); $nodeAggregate = $this->requireProjectedNodeAggregate( $command->contentStreamId, @@ -41,6 +41,19 @@ private function handleChangeNodeAggregateName(ChangeNodeAggregateName $command, $contentRepository ); $this->requireNodeAggregateToNotBeRoot($nodeAggregate, 'and Root Node Aggregates cannot be renamed'); + $this->requireNodeAggregateToBeUntethered($nodeAggregate); + foreach ($contentRepository->getContentGraph()->findParentNodeAggregates($command->contentStreamId, $command->nodeAggregateId) as $parentNodeAggregate) { + foreach ($parentNodeAggregate->occupiedDimensionSpacePoints as $occupiedParentDimensionSpacePoint) { + $this->requireNodeNameToBeUnoccupied( + $command->contentStreamId, + $command->newNodeName, + $parentNodeAggregate->nodeAggregateId, + $occupiedParentDimensionSpacePoint, + $parentNodeAggregate->coveredDimensionSpacePoints, + $contentRepository + ); + } + } $events = Events::with( new NodeAggregateNameWasChanged( diff --git a/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/Features/NodeRenaming.php b/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/Features/NodeRenaming.php index 9de587eb916..bae8d6d1163 100644 --- a/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/Features/NodeRenaming.php +++ b/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/Features/NodeRenaming.php @@ -15,10 +15,11 @@ namespace Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\Features; use Behat\Gherkin\Node\TableNode; -use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; +use Neos\ContentRepository\Core\Feature\NodeRenaming\Command\ChangeNodeAggregateName; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeName; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\CRTestSuiteRuntimeVariables; -use Neos\EventStore\Model\Event\StreamName; use PHPUnit\Framework\Assert; /** @@ -28,6 +29,41 @@ trait NodeRenaming { use CRTestSuiteRuntimeVariables; + /** + * @Given /^the command ChangeNodeAggregateName is executed with payload:$/ + * @param TableNode $payloadTable + * @throws \Exception + */ + public function theCommandChangeNodeAggregateNameIsExecutedWithPayload(TableNode $payloadTable) + { + $commandArguments = $this->readPayloadTable($payloadTable); + $contentStreamId = isset($commandArguments['contentStreamId']) + ? ContentStreamId::fromString($commandArguments['contentStreamId']) + : $this->currentContentStreamId; + + $command = ChangeNodeAggregateName::create( + $contentStreamId, + NodeAggregateId::fromString($commandArguments['nodeAggregateId']), + NodeName::fromString($commandArguments['newNodeName']), + ); + + $this->lastCommandOrEventResult = $this->currentContentRepository->handle($command); + } + + /** + * @Given /^the command ChangeNodeAggregateName is executed with payload and exceptions are caught:$/ + * @param TableNode $payloadTable + * @throws \Exception + */ + public function theCommandChangeNodeAggregateNameIsExecutedWithPayloadAndExceptionsAreCaught(TableNode $payloadTable) + { + try { + $this->theCommandChangeNodeAggregateNameIsExecutedWithPayload($payloadTable); + } catch (\Exception $exception) { + $this->lastCommandException = $exception; + } + } + /** * @Then /^I expect the node "([^"]*)" to have the name "([^"]*)"$/ * @param string $nodeAggregateId From 046db8857230c9689883b5daa0cf997f7d2c6fa4 Mon Sep 17 00:00:00 2001 From: Bernhard Schmitt <schmitt@sitegeist.de> Date: Mon, 30 Oct 2023 17:01:49 +0100 Subject: [PATCH 21/53] Clean up code --- .../Classes/Feature/NodeRenaming/NodeRenaming.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/NodeRenaming.php b/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/NodeRenaming.php index 9c04390f074..f38e032ce57 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/NodeRenaming.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeRenaming/NodeRenaming.php @@ -15,7 +15,6 @@ namespace Neos\ContentRepository\Core\Feature\NodeRenaming; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\EventStore\Events; use Neos\ContentRepository\Core\EventStore\EventsToPublish; use Neos\ContentRepository\Core\Feature\Common\ConstraintChecks; From 9c8f3077b337ae38556d43cbd75142ee1484944a Mon Sep 17 00:00:00 2001 From: Bernhard Schmitt <schmitt@sitegeist.de> Date: Tue, 31 Oct 2023 15:03:57 +0100 Subject: [PATCH 22/53] 4663 - Support tethered children for root nodes --- ...TetheredChildren_WithoutDimensions.feature | 164 ++++++++++ ...AndTetheredChildren_WithDimensions.feature | 293 ++++++++++++++++++ ...eAggregateWithNode_WithDimensions.feature} | 0 .../Feature/NodeCreation/NodeCreation.php | 1 - .../CreateRootNodeAggregateWithNode.php | 61 +++- .../RootNodeCreation/RootNodeHandling.php | 112 ++++++- .../Bootstrap/Features/NodeCreation.php | 3 + 7 files changed, 624 insertions(+), 10 deletions(-) create mode 100644 Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/03-CreateRootNodeAggregateWithNodeAndTetheredChildren_WithoutDimensions.feature create mode 100644 Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/04-CreateRootNodeAggregateWithNodeAndTetheredChildren_WithDimensions.feature rename Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/{03-CreateRootNodeAggregateWithNode_WithDimensions.feature => 05-CreateRootNodeAggregateWithNode_WithDimensions.feature} (100%) diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/03-CreateRootNodeAggregateWithNodeAndTetheredChildren_WithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/03-CreateRootNodeAggregateWithNodeAndTetheredChildren_WithoutDimensions.feature new file mode 100644 index 00000000000..7678cbc51e4 --- /dev/null +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/03-CreateRootNodeAggregateWithNodeAndTetheredChildren_WithoutDimensions.feature @@ -0,0 +1,164 @@ +@contentrepository @adapters=DoctrineDBAL +Feature: Create a root node aggregate with tethered children + + As a user of the CR I want to create a new root node aggregate with an initial node and tethered children. + + These are the test cases without dimensions involved + + Background: + Given using no content dimensions + And using the following node types: + """yaml + 'Neos.ContentRepository.Testing:SubSubNode': + properties: + text: + defaultValue: 'my sub sub default' + type: string + 'Neos.ContentRepository.Testing:SubNode': + childNodes: + grandchild-node: + type: 'Neos.ContentRepository.Testing:SubSubNode' + properties: + text: + defaultValue: 'my sub default' + type: string + 'Neos.ContentRepository.Testing:RootWithTetheredChildNodes': + superTypes: + 'Neos.ContentRepository:Root': true + childNodes: + child-node: + type: 'Neos.ContentRepository.Testing:SubNode' + """ + And using identifier "default", I define a content repository + And I am in content repository "default" + And the command CreateRootWorkspace is executed with payload: + | Key | Value | + | workspaceName | "live" | + | workspaceTitle | "Live" | + | workspaceDescription | "The live workspace" | + | newContentStreamId | "cs-identifier" | + And the graph projection is fully up to date + And I am in content stream "cs-identifier" + And I am in dimension space point {} + And I am user identified by "initiating-user-identifier" + + Scenario: Create root node with tethered children + When the command CreateRootNodeAggregateWithNode is executed with payload: + | Key | Value | + | nodeAggregateId | "lady-eleonode-rootford" | + | nodeTypeName | "Neos.ContentRepository.Testing:RootWithTetheredChildNodes" | + | tetheredDescendantNodeAggregateIds | {"child-node": "nody-mc-nodeface", "child-node/grandchild-node": "nodimus-prime"} | + And the graph projection is fully up to date + + Then I expect exactly 4 events to be published on stream "ContentStream:cs-identifier" + And event at index 1 is of type "RootNodeAggregateWithNodeWasCreated" with payload: + | Key | Expected | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | + | nodeTypeName | "Neos.ContentRepository.Testing:RootWithTetheredChildNodes" | + | coveredDimensionSpacePoints | [[]] | + | nodeAggregateClassification | "root" | + And event at index 2 is of type "NodeAggregateWithNodeWasCreated" with payload: + | Key | Expected | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | + | nodeTypeName | "Neos.ContentRepository.Testing:SubNode" | + | originDimensionSpacePoint | [] | + | coveredDimensionSpacePoints | [[]] | + | parentNodeAggregateId | "lady-eleonode-rootford" | + | nodeName | "child-node" | + | initialPropertyValues | {"text": {"value": "my sub default", "type": "string"}} | + | nodeAggregateClassification | "tethered" | + And event at index 3 is of type "NodeAggregateWithNodeWasCreated" with payload: + | Key | Expected | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimus-prime" | + | nodeTypeName | "Neos.ContentRepository.Testing:SubSubNode" | + | originDimensionSpacePoint | [] | + | coveredDimensionSpacePoints | [[]] | + | parentNodeAggregateId | "nody-mc-nodeface" | + | nodeName | "grandchild-node" | + | initialPropertyValues | {"text": {"value": "my sub sub default", "type": "string"}} | + | nodeAggregateClassification | "tethered" | + + And I expect the node aggregate "lady-eleonode-rootford" to exist + And I expect this node aggregate to be classified as "root" + And I expect this node aggregate to be of type "Neos.ContentRepository.Testing:RootWithTetheredChildNodes" + And I expect this node aggregate to be unnamed + And I expect this node aggregate to occupy dimension space points [[]] + And I expect this node aggregate to cover dimension space points [[]] + And I expect this node aggregate to disable dimension space points [] + And I expect this node aggregate to have no parent node aggregates + And I expect this node aggregate to have the child node aggregates ["nody-mc-nodeface"] + + And I expect the node aggregate "nody-mc-nodeface" to exist + And I expect this node aggregate to be classified as "tethered" + And I expect this node aggregate to be of type "Neos.ContentRepository.Testing:SubNode" + And I expect this node aggregate to be named "child-node" + And I expect this node aggregate to occupy dimension space points [[]] + And I expect this node aggregate to cover dimension space points [[]] + And I expect this node aggregate to disable dimension space points [] + And I expect this node aggregate to have the parent node aggregates ["lady-eleonode-rootford"] + And I expect this node aggregate to have the child node aggregates ["nodimus-prime"] + + And I expect the node aggregate "nodimus-prime" to exist + And I expect this node aggregate to be classified as "tethered" + And I expect this node aggregate to be of type "Neos.ContentRepository.Testing:SubSubNode" + And I expect this node aggregate to be named "grandchild-node" + And I expect this node aggregate to occupy dimension space points [[]] + And I expect this node aggregate to cover dimension space points [[]] + And I expect this node aggregate to disable dimension space points [] + And I expect this node aggregate to have the parent node aggregates ["nody-mc-nodeface"] + And I expect this node aggregate to have no child node aggregates + + And I expect the graph projection to consist of exactly 3 nodes + And I expect a node identified by cs-identifier;lady-eleonode-rootford;{} to exist in the content graph + And I expect this node to be classified as "root" + And I expect this node to be of type "Neos.ContentRepository.Testing:RootWithTetheredChildNodes" + And I expect this node to be unnamed + And I expect this node to have no properties + + And I expect a node identified by cs-identifier;nody-mc-nodeface;{} to exist in the content graph + And I expect this node to be classified as "tethered" + And I expect this node to be of type "Neos.ContentRepository.Testing:SubNode" + And I expect this node to be named "child-node" + And I expect this node to have the following properties: + | Key | Value | + | text | "my sub default" | + + And I expect a node identified by cs-identifier;nodimus-prime;{} to exist in the content graph + And I expect this node to be classified as "tethered" + And I expect this node to be of type "Neos.ContentRepository.Testing:SubSubNode" + And I expect this node to be named "grandchild-node" + And I expect this node to have the following properties: + | Key | Value | + | text | "my sub sub default" | + + When I am in content stream "cs-identifier" and dimension space point [] + And I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{} + And I expect this node to have no parent node + And I expect this node to have the following child nodes: + | Name | NodeDiscriminator | + | child-node | cs-identifier;nody-mc-nodeface;{} | + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced + + And I expect node aggregate identifier "nody-mc-nodeface" and node path "child-node" to lead to node cs-identifier;nody-mc-nodeface;{} + And I expect this node to be a child of node cs-identifier;lady-eleonode-rootford;{} + And I expect this node to have the following child nodes: + | Name | NodeDiscriminator | + | grandchild-node | cs-identifier;nodimus-prime;{} | + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced + + And I expect node aggregate identifier "nodimus-prime" and node path "child-node/grandchild-node" to lead to node cs-identifier;nodimus-prime;{} + And I expect this node to be a child of node cs-identifier;nody-mc-nodeface;{} + And I expect this node to have no child nodes + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/04-CreateRootNodeAggregateWithNodeAndTetheredChildren_WithDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/04-CreateRootNodeAggregateWithNodeAndTetheredChildren_WithDimensions.feature new file mode 100644 index 00000000000..cf15c9682e6 --- /dev/null +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/04-CreateRootNodeAggregateWithNodeAndTetheredChildren_WithDimensions.feature @@ -0,0 +1,293 @@ +@contentrepository @adapters=DoctrineDBAL +Feature: Create a root node aggregate with tethered children + + As a user of the CR I want to create a new root node aggregate with an initial node and tethered children. + + These are the test cases with dimensions involved + + Background: + Given using the following content dimensions: + | Identifier | Values | Generalizations | + | language | de, en, gsw, en_US | en_US->en, gsw->de | + And using the following node types: + """yaml + 'Neos.ContentRepository.Testing:SubSubNode': + properties: + text: + defaultValue: 'my sub sub default' + type: string + 'Neos.ContentRepository.Testing:SubNode': + childNodes: + grandchild-node: + type: 'Neos.ContentRepository.Testing:SubSubNode' + properties: + text: + defaultValue: 'my sub default' + type: string + 'Neos.ContentRepository.Testing:RootWithTetheredChildNodes': + superTypes: + 'Neos.ContentRepository:Root': true + childNodes: + child-node: + type: 'Neos.ContentRepository.Testing:SubNode' + """ + And using identifier "default", I define a content repository + And I am in content repository "default" + And the command CreateRootWorkspace is executed with payload: + | Key | Value | + | workspaceName | "live" | + | workspaceTitle | "Live" | + | workspaceDescription | "The live workspace" | + | newContentStreamId | "cs-identifier" | + And the graph projection is fully up to date + And I am in content stream "cs-identifier" + And I am user identified by "initiating-user-identifier" + + Scenario: Create root node with tethered children + When the command CreateRootNodeAggregateWithNode is executed with payload: + | Key | Value | + | nodeAggregateId | "lady-eleonode-rootford" | + | nodeTypeName | "Neos.ContentRepository.Testing:RootWithTetheredChildNodes" | + | tetheredDescendantNodeAggregateIds | {"child-node": "nody-mc-nodeface", "child-node/grandchild-node": "nodimus-prime"} | + And the graph projection is fully up to date + + Then I expect exactly 6 events to be published on stream "ContentStream:cs-identifier" + And event at index 1 is of type "RootNodeAggregateWithNodeWasCreated" with payload: + | Key | Expected | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | + | nodeTypeName | "Neos.ContentRepository.Testing:RootWithTetheredChildNodes" | + | coveredDimensionSpacePoints | [{"language": "de"}, {"language": "en"}, {"language": "gsw"}, {"language": "en_US"}] | + | nodeAggregateClassification | "root" | + And event at index 2 is of type "NodeAggregateWithNodeWasCreated" with payload: + | Key | Expected | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | + | nodeTypeName | "Neos.ContentRepository.Testing:SubNode" | + | originDimensionSpacePoint | {"language": "de"} | + | coveredDimensionSpacePoints | [{"language": "de"},{"language": "gsw"}] | + | parentNodeAggregateId | "lady-eleonode-rootford" | + | nodeName | "child-node" | + | initialPropertyValues | {"text": {"value": "my sub default", "type": "string"}} | + | nodeAggregateClassification | "tethered" | + And event at index 3 is of type "NodeAggregateWithNodeWasCreated" with payload: + | Key | Expected | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimus-prime" | + | nodeTypeName | "Neos.ContentRepository.Testing:SubSubNode" | + | originDimensionSpacePoint | {"language": "de"} | + | coveredDimensionSpacePoints | [{"language": "de"},{"language": "gsw"}] | + | parentNodeAggregateId | "nody-mc-nodeface" | + | nodeName | "grandchild-node" | + | initialPropertyValues | {"text": {"value": "my sub sub default", "type": "string"}} | + | nodeAggregateClassification | "tethered" | + And event at index 4 is of type "NodeAggregateWithNodeWasCreated" with payload: + | Key | Expected | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | + | nodeTypeName | "Neos.ContentRepository.Testing:SubNode" | + | originDimensionSpacePoint | {"language": "en"} | + | coveredDimensionSpacePoints | [{"language": "en"},{"language": "en_US"}] | + | parentNodeAggregateId | "lady-eleonode-rootford" | + | nodeName | "child-node" | + | initialPropertyValues | {"text": {"value": "my sub default", "type": "string"}} | + | nodeAggregateClassification | "tethered" | + And event at index 5 is of type "NodeAggregateWithNodeWasCreated" with payload: + | Key | Expected | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimus-prime" | + | nodeTypeName | "Neos.ContentRepository.Testing:SubSubNode" | + | originDimensionSpacePoint | {"language": "en"} | + | coveredDimensionSpacePoints | [{"language": "en"},{"language": "en_US"}] | + | parentNodeAggregateId | "nody-mc-nodeface" | + | nodeName | "grandchild-node" | + | initialPropertyValues | {"text": {"value": "my sub sub default", "type": "string"}} | + | nodeAggregateClassification | "tethered" | + + And I expect the node aggregate "lady-eleonode-rootford" to exist + And I expect this node aggregate to be classified as "root" + And I expect this node aggregate to be of type "Neos.ContentRepository.Testing:RootWithTetheredChildNodes" + And I expect this node aggregate to be unnamed + And I expect this node aggregate to occupy dimension space points [{}] + And I expect this node aggregate to cover dimension space points [{"language": "de"}, {"language": "en"}, {"language": "gsw"}, {"language": "en_US"}] + And I expect this node aggregate to disable dimension space points [] + And I expect this node aggregate to have no parent node aggregates + And I expect this node aggregate to have the child node aggregates ["nody-mc-nodeface"] + + And I expect the node aggregate "nody-mc-nodeface" to exist + And I expect this node aggregate to be classified as "tethered" + And I expect this node aggregate to be of type "Neos.ContentRepository.Testing:SubNode" + And I expect this node aggregate to be named "child-node" + And I expect this node aggregate to occupy dimension space points [{"language": "de"}, {"language": "en"}] + And I expect this node aggregate to cover dimension space points [{"language": "de"}, {"language": "en"}, {"language": "gsw"}, {"language": "en_US"}] + And I expect this node aggregate to disable dimension space points [] + And I expect this node aggregate to have the parent node aggregates ["lady-eleonode-rootford"] + And I expect this node aggregate to have the child node aggregates ["nodimus-prime"] + + And I expect the node aggregate "nodimus-prime" to exist + And I expect this node aggregate to be classified as "tethered" + And I expect this node aggregate to be of type "Neos.ContentRepository.Testing:SubSubNode" + And I expect this node aggregate to be named "grandchild-node" + And I expect this node aggregate to occupy dimension space points [{"language": "de"}, {"language": "en"}] + And I expect this node aggregate to cover dimension space points [{"language": "de"}, {"language": "en"}, {"language": "gsw"}, {"language": "en_US"}] + And I expect this node aggregate to disable dimension space points [] + And I expect this node aggregate to have the parent node aggregates ["nody-mc-nodeface"] + And I expect this node aggregate to have no child node aggregates + + And I expect the graph projection to consist of exactly 5 nodes + And I expect a node identified by cs-identifier;lady-eleonode-rootford;{} to exist in the content graph + And I expect this node to be classified as "root" + And I expect this node to be of type "Neos.ContentRepository.Testing:RootWithTetheredChildNodes" + And I expect this node to be unnamed + And I expect this node to have no properties + + And I expect a node identified by cs-identifier;nody-mc-nodeface;{"language": "de"} to exist in the content graph + And I expect this node to be classified as "tethered" + And I expect this node to be of type "Neos.ContentRepository.Testing:SubNode" + And I expect this node to be named "child-node" + And I expect this node to have the following properties: + | Key | Value | + | text | "my sub default" | + + And I expect a node identified by cs-identifier;nody-mc-nodeface;{"language": "en"} to exist in the content graph + And I expect this node to be classified as "tethered" + And I expect this node to be of type "Neos.ContentRepository.Testing:SubNode" + And I expect this node to be named "child-node" + And I expect this node to have the following properties: + | Key | Value | + | text | "my sub default" | + + And I expect a node identified by cs-identifier;nodimus-prime;{"language": "de"} to exist in the content graph + And I expect this node to be classified as "tethered" + And I expect this node to be of type "Neos.ContentRepository.Testing:SubSubNode" + And I expect this node to be named "grandchild-node" + And I expect this node to have the following properties: + | Key | Value | + | text | "my sub sub default" | + + And I expect a node identified by cs-identifier;nodimus-prime;{"language": "en"} to exist in the content graph + And I expect this node to be classified as "tethered" + And I expect this node to be of type "Neos.ContentRepository.Testing:SubSubNode" + And I expect this node to be named "grandchild-node" + And I expect this node to have the following properties: + | Key | Value | + | text | "my sub sub default" | + + When I am in content stream "cs-identifier" and dimension space point {"language": "de"} + And I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{} + And I expect this node to have no parent node + And I expect this node to have the following child nodes: + | Name | NodeDiscriminator | + | child-node | cs-identifier;nody-mc-nodeface;{"language": "de"} | + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced + + And I expect node aggregate identifier "nody-mc-nodeface" and node path "child-node" to lead to node cs-identifier;nody-mc-nodeface;{"language": "de"} + And I expect this node to be a child of node cs-identifier;lady-eleonode-rootford;{} + And I expect this node to have the following child nodes: + | Name | NodeDiscriminator | + | grandchild-node | cs-identifier;nodimus-prime;{"language": "de"} | + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced + + And I expect node aggregate identifier "nodimus-prime" and node path "child-node/grandchild-node" to lead to node cs-identifier;nodimus-prime;{"language": "de"} + And I expect this node to be a child of node cs-identifier;nody-mc-nodeface;{"language": "de"} + And I expect this node to have no child nodes + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced + + When I am in content stream "cs-identifier" and dimension space point {"language": "gsw"} + And I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{} + And I expect this node to have no parent node + And I expect this node to have the following child nodes: + | Name | NodeDiscriminator | + | child-node | cs-identifier;nody-mc-nodeface;{"language": "de"} | + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced + + And I expect node aggregate identifier "nody-mc-nodeface" and node path "child-node" to lead to node cs-identifier;nody-mc-nodeface;{"language": "de"} + And I expect this node to be a child of node cs-identifier;lady-eleonode-rootford;{} + And I expect this node to have the following child nodes: + | Name | NodeDiscriminator | + | grandchild-node | cs-identifier;nodimus-prime;{"language": "de"} | + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced + + And I expect node aggregate identifier "nodimus-prime" and node path "child-node/grandchild-node" to lead to node cs-identifier;nodimus-prime;{"language": "de"} + And I expect this node to be a child of node cs-identifier;nody-mc-nodeface;{"language": "de"} + And I expect this node to have no child nodes + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced + + + When I am in content stream "cs-identifier" and dimension space point {"language": "en"} + And I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{} + And I expect this node to have no parent node + And I expect this node to have the following child nodes: + | Name | NodeDiscriminator | + | child-node | cs-identifier;nody-mc-nodeface;{"language": "en"} | + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced + + And I expect node aggregate identifier "nody-mc-nodeface" and node path "child-node" to lead to node cs-identifier;nody-mc-nodeface;{"language": "en"} + And I expect this node to be a child of node cs-identifier;lady-eleonode-rootford;{} + And I expect this node to have the following child nodes: + | Name | NodeDiscriminator | + | grandchild-node | cs-identifier;nodimus-prime;{"language": "en"} | + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced + + And I expect node aggregate identifier "nodimus-prime" and node path "child-node/grandchild-node" to lead to node cs-identifier;nodimus-prime;{"language": "en"} + And I expect this node to be a child of node cs-identifier;nody-mc-nodeface;{"language": "en"} + And I expect this node to have no child nodes + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced + + + When I am in content stream "cs-identifier" and dimension space point {"language": "en_US"} + And I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{} + And I expect this node to have no parent node + And I expect this node to have the following child nodes: + | Name | NodeDiscriminator | + | child-node | cs-identifier;nody-mc-nodeface;{"language": "en"} | + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced + + And I expect node aggregate identifier "nody-mc-nodeface" and node path "child-node" to lead to node cs-identifier;nody-mc-nodeface;{"language": "en"} + And I expect this node to be a child of node cs-identifier;lady-eleonode-rootford;{} + And I expect this node to have the following child nodes: + | Name | NodeDiscriminator | + | grandchild-node | cs-identifier;nodimus-prime;{"language": "en"} | + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced + + And I expect node aggregate identifier "nodimus-prime" and node path "child-node/grandchild-node" to lead to node cs-identifier;nodimus-prime;{"language": "en"} + And I expect this node to be a child of node cs-identifier;nody-mc-nodeface;{"language": "en"} + And I expect this node to have no child nodes + And I expect this node to have no preceding siblings + And I expect this node to have no succeeding siblings + And I expect this node to have no references + And I expect this node to not be referenced + diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/03-CreateRootNodeAggregateWithNode_WithDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/05-CreateRootNodeAggregateWithNode_WithDimensions.feature similarity index 100% rename from Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/03-CreateRootNodeAggregateWithNode_WithDimensions.feature rename to Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/01-RootNodeCreation/05-CreateRootNodeAggregateWithNode_WithDimensions.feature diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php index 739a7b38a5c..07c0518e54b 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php @@ -222,7 +222,6 @@ private function handleCreateNodeAggregateWithNodeAndSerializedProperties( ); } - $defaultPropertyValues = SerializedPropertyValues::defaultFromNodeType($nodeType); $initialPropertyValues = $defaultPropertyValues->merge($command->initialPropertyValues); diff --git a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php index ec57b71854f..0e2ceab99de 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php +++ b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/Command/CreateRootNodeAggregateWithNode.php @@ -16,6 +16,7 @@ use Neos\ContentRepository\Core\CommandHandler\CommandInterface; use Neos\ContentRepository\Core\Feature\Common\RebasableToOtherContentStreamsInterface; +use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdsByNodePaths; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; @@ -28,7 +29,7 @@ * * @api commands are the write-API of the ContentRepository */ -final class CreateRootNodeAggregateWithNode implements +final readonly class CreateRootNodeAggregateWithNode implements CommandInterface, \JsonSerializable, RebasableToOtherContentStreamsInterface @@ -37,11 +38,13 @@ final class CreateRootNodeAggregateWithNode implements * @param ContentStreamId $contentStreamId The content stream in which the root node should be created in * @param NodeAggregateId $nodeAggregateId The id of the root node aggregate to create * @param NodeTypeName $nodeTypeName Name of type of the new node to create + * @param NodeAggregateIdsByNodePaths $tetheredDescendantNodeAggregateIds Predefined aggregate ids of tethered child nodes per path. For any tethered node that has no matching entry in this set, the node aggregate id is generated randomly. Since tethered nodes may have tethered child nodes themselves, this works for multiple levels ({@see self::withTetheredDescendantNodeAggregateIds()}) */ private function __construct( - public readonly ContentStreamId $contentStreamId, - public readonly NodeAggregateId $nodeAggregateId, - public readonly NodeTypeName $nodeTypeName, + public ContentStreamId $contentStreamId, + public NodeAggregateId $nodeAggregateId, + public NodeTypeName $nodeTypeName, + public NodeAggregateIdsByNodePaths $tetheredDescendantNodeAggregateIds, ) { } @@ -52,12 +55,54 @@ private function __construct( */ public static function create(ContentStreamId $contentStreamId, NodeAggregateId $nodeAggregateId, NodeTypeName $nodeTypeName): self { - return new self($contentStreamId, $nodeAggregateId, $nodeTypeName); + return new self( + $contentStreamId, + $nodeAggregateId, + $nodeTypeName, + NodeAggregateIdsByNodePaths::createEmpty() + ); } + /** + * Specify explicitly the node aggregate ids for the tethered children {@see tetheredDescendantNodeAggregateIds}. + * + * In case you want to create a batch of commands where one creates the root node and a succeeding command needs + * a tethered node aggregate id, you need to generate the child node aggregate ids in advance. + * + * _Alternatively you would need to fetch the created tethered node first from the subgraph. + * {@see ContentSubgraphInterface::findChildNodeConnectedThroughEdgeName()}_ + * + * The helper method {@see NodeAggregateIdsByNodePaths::createForNodeType()} will generate recursively + * node aggregate ids for every tethered child node: + * + * ```php + * $tetheredDescendantNodeAggregateIds = NodeAggregateIdsByNodePaths::createForNodeType( + * $command->nodeTypeName, + * $nodeTypeManager + * ); + * $command = $command->withTetheredDescendantNodeAggregateIds($tetheredDescendantNodeAggregateIds): + * ``` + * + * The generated node aggregate id for the tethered node "main" is this way known before the command is issued: + * + * ```php + * $mainNodeAggregateId = $command->tetheredDescendantNodeAggregateIds->getNodeAggregateId(NodePath::fromString('main')); + * ``` + * + * Generating the node aggregate ids from user land is totally optional. + */ + public function withTetheredDescendantNodeAggregateIds(NodeAggregateIdsByNodePaths $tetheredDescendantNodeAggregateIds): self + { + return new self( + $this->contentStreamId, + $this->nodeAggregateId, + $this->nodeTypeName, + $tetheredDescendantNodeAggregateIds, + ); + } /** - * @param array<string,string> $array + * @param array<string,mixed> $array */ public static function fromArray(array $array): self { @@ -65,6 +110,9 @@ public static function fromArray(array $array): self ContentStreamId::fromString($array['contentStreamId']), NodeAggregateId::fromString($array['nodeAggregateId']), NodeTypeName::fromString($array['nodeTypeName']), + isset($array['tetheredDescendantNodeAggregateIds']) + ? NodeAggregateIdsByNodePaths::fromArray($array['tetheredDescendantNodeAggregateIds']) + : NodeAggregateIdsByNodePaths::createEmpty() ); } @@ -82,6 +130,7 @@ public function createCopyForContentStream(ContentStreamId $target): self $target, $this->nodeAggregateId, $this->nodeTypeName, + $this->tetheredDescendantNodeAggregateIds ); } } diff --git a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/RootNodeHandling.php b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/RootNodeHandling.php index 844f63f7c24..20de19bc5c6 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/RootNodeHandling.php +++ b/Neos.ContentRepository.Core/Classes/Feature/RootNodeCreation/RootNodeHandling.php @@ -16,13 +16,18 @@ use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; +use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\EventStore\Events; use Neos\ContentRepository\Core\EventStore\EventsToPublish; use Neos\ContentRepository\Core\Feature\ContentStreamEventStreamName; +use Neos\ContentRepository\Core\Feature\NodeCreation\Dto\NodeAggregateIdsByNodePaths; +use Neos\ContentRepository\Core\Feature\NodeCreation\Event\NodeAggregateWithNodeWasCreated; +use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; use Neos\ContentRepository\Core\Feature\RootNodeCreation\Command\UpdateRootNodeAggregateDimensions; use Neos\ContentRepository\Core\Feature\RootNodeCreation\Event\RootNodeAggregateDimensionsWereUpdated; use Neos\ContentRepository\Core\NodeType\NodeType; use Neos\ContentRepository\Core\NodeType\NodeTypeName; +use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; use Neos\ContentRepository\Core\SharedModel\Exception\ContentStreamDoesNotExistYet; use Neos\ContentRepository\Core\SharedModel\Exception\NodeAggregateIsNotRoot; use Neos\ContentRepository\Core\SharedModel\Exception\NodeAggregatesTypeIsAmbiguous; @@ -31,8 +36,11 @@ use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFound; use Neos\ContentRepository\Core\Feature\RootNodeCreation\Command\CreateRootNodeAggregateWithNode; use Neos\ContentRepository\Core\Feature\RootNodeCreation\Event\RootNodeAggregateWithNodeWasCreated; +use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; use Neos\ContentRepository\Core\Feature\Common\NodeAggregateEventPublisher; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\EventStore\Model\EventStream\ExpectedVersion; /** @@ -76,12 +84,33 @@ private function handleCreateRootNodeAggregateWithNode( $contentRepository ); - $events = Events::with( + $descendantNodeAggregateIds = $command->tetheredDescendantNodeAggregateIds->completeForNodeOfType( + $command->nodeTypeName, + $this->nodeTypeManager + ); + // Write the auto-created descendant node aggregate ids back to the command; + // so that when rebasing the command, it stays fully deterministic. + $command = $command->withTetheredDescendantNodeAggregateIds($descendantNodeAggregateIds); + + $events = [ $this->createRootWithNode( $command, $this->getAllowedDimensionSubspace() ) - ); + ]; + + foreach ($this->getInterDimensionalVariationGraph()->getRootGeneralizations() as $rootGeneralization) { + array_push($events, ...iterator_to_array($this->handleTetheredRootChildNodes( + $command, + $nodeType, + OriginDimensionSpacePoint::fromDimensionSpacePoint($rootGeneralization), + $this->getInterDimensionalVariationGraph()->getSpecializationSet($rootGeneralization, true), + $command->nodeAggregateId, + $command->tetheredDescendantNodeAggregateIds, + null, + $contentRepository + ))); + } $contentStreamEventStream = ContentStreamEventStreamName::fromContentStreamId( $command->contentStreamId @@ -90,7 +119,7 @@ private function handleCreateRootNodeAggregateWithNode( $contentStreamEventStream->getEventStreamName(), NodeAggregateEventPublisher::enrichWithCommand( $command, - $events + Events::fromArray($events) ), ExpectedVersion::ANY() ); @@ -147,4 +176,81 @@ private function handleUpdateRootNodeAggregateDimensions( ExpectedVersion::ANY() ); } + + /** + * @throws ContentStreamDoesNotExistYet + * @throws NodeTypeNotFoundException + */ + private function handleTetheredRootChildNodes( + CreateRootNodeAggregateWithNode $command, + NodeType $nodeType, + OriginDimensionSpacePoint $originDimensionSpacePoint, + DimensionSpacePointSet $coveredDimensionSpacePoints, + NodeAggregateId $parentNodeAggregateId, + NodeAggregateIdsByNodePaths $nodeAggregateIdsByNodePath, + ?NodePath $nodePath, + ContentRepository $contentRepository, + ): Events { + $events = []; + foreach ($this->getNodeTypeManager()->getTetheredNodesConfigurationForNodeType($nodeType) as $rawNodeName => $childNodeType) { + assert($childNodeType instanceof NodeType); + $nodeName = NodeName::fromString($rawNodeName); + $childNodePath = $nodePath + ? $nodePath->appendPathSegment($nodeName) + : NodePath::fromString($nodeName->value); + $childNodeAggregateId = $nodeAggregateIdsByNodePath->getNodeAggregateId($childNodePath) + ?? NodeAggregateId::create(); + $initialPropertyValues = SerializedPropertyValues::defaultFromNodeType($childNodeType); + + $this->requireContentStreamToExist($command->contentStreamId, $contentRepository); + $events[] = $this->createTetheredWithNodeForRoot( + $command, + $childNodeAggregateId, + $childNodeType->name, + $originDimensionSpacePoint, + $coveredDimensionSpacePoints, + $parentNodeAggregateId, + $nodeName, + $initialPropertyValues + ); + + array_push($events, ...iterator_to_array($this->handleTetheredRootChildNodes( + $command, + $childNodeType, + $originDimensionSpacePoint, + $coveredDimensionSpacePoints, + $childNodeAggregateId, + $nodeAggregateIdsByNodePath, + $childNodePath, + $contentRepository + ))); + } + + return Events::fromArray($events); + } + + private function createTetheredWithNodeForRoot( + CreateRootNodeAggregateWithNode $command, + NodeAggregateId $nodeAggregateId, + NodeTypeName $nodeTypeName, + OriginDimensionSpacePoint $originDimensionSpacePoint, + DimensionSpacePointSet $coveredDimensionSpacePoints, + NodeAggregateId $parentNodeAggregateId, + NodeName $nodeName, + SerializedPropertyValues $initialPropertyValues, + NodeAggregateId $precedingNodeAggregateId = null + ): NodeAggregateWithNodeWasCreated { + return new NodeAggregateWithNodeWasCreated( + $command->contentStreamId, + $nodeAggregateId, + $nodeTypeName, + $originDimensionSpacePoint, + $coveredDimensionSpacePoints, + $parentNodeAggregateId, + $nodeName, + $initialPropertyValues, + NodeAggregateClassification::CLASSIFICATION_TETHERED, + $precedingNodeAggregateId + ); + } } diff --git a/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/Features/NodeCreation.php b/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/Features/NodeCreation.php index 9d7eb8ee253..41f04d7afff 100644 --- a/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/Features/NodeCreation.php +++ b/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/Features/NodeCreation.php @@ -64,6 +64,9 @@ public function theCommandCreateRootNodeAggregateWithNodeIsExecutedWithPayload(T $nodeAggregateId, NodeTypeName::fromString($commandArguments['nodeTypeName']), ); + if (isset($commandArguments['tetheredDescendantNodeAggregateIds'])) { + $command = $command->withTetheredDescendantNodeAggregateIds(NodeAggregateIdsByNodePaths::fromArray($commandArguments['tetheredDescendantNodeAggregateIds'])); + } $this->lastCommandOrEventResult = $this->currentContentRepository->handle($command); $this->currentRootNodeAggregateId = $nodeAggregateId; From 7fde45256fc7dad1baa4522022d82351def7bfa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Mu=CC=88ller?= <christian@flownative.com> Date: Tue, 31 Oct 2023 16:42:38 +0100 Subject: [PATCH 23/53] TASK: All dependencies within collection point to `self.version` Re-adjusts dependencies to point to self.version for easier maintenance. Fixes: #4257 --- Neos.Neos/composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Neos.Neos/composer.json b/Neos.Neos/composer.json index 5ef62092daa..92588751cda 100644 --- a/Neos.Neos/composer.json +++ b/Neos.Neos/composer.json @@ -7,17 +7,17 @@ "description": "An open source Content Application Platform based on Flow. A set of core Content Management features is resting within a larger context that allows you to build a perfectly customized experience for your users.", "require": { "php": "^7.3 || ^8.0", - "neos/diff": "~7.3.0", + "neos/diff": "self.version", "neos/flow": "~7.3.0", - "neos/media-browser": "~7.3.0", + "neos/media-browser": "self.version", "neos/party": "*", "neos/twitter-bootstrap": "*", - "neos/content-repository": "~7.3.0", - "neos/fusion": "~7.3.0", + "neos/content-repository": "self.version", + "neos/fusion": "self.version", "neos/fusion-afx": "self.version", "neos/fusion-form": "^1.0 || ^2.0", "neos/fluid-adaptor": "~7.3.0", - "neos/media": "~7.3.0", + "neos/media": "self.version", "behat/transliterator": "~1.0" }, "suggest": { From adbb66d7cfaf9f8f0c905818c0ace86dd9d2b322 Mon Sep 17 00:00:00 2001 From: Bernhard Schmitt <schmitt@sitegeist.de> Date: Tue, 31 Oct 2023 17:22:39 +0100 Subject: [PATCH 24/53] 4663 - Adjust StructureAdjustments to properly deal with root nodes --- .../StructureAdjustment/TetheredNodes.feature | 122 +++++++++++------- .../Feature/Common/TetheredNodeInternals.php | 72 ++++++++--- .../Feature/NodeTypeChange/NodeTypeChange.php | 5 +- .../src/Adjustment/DimensionAdjustment.php | 19 +-- .../src/Adjustment/StructureAdjustment.php | 31 ++++- .../Adjustment/TetheredNodeAdjustments.php | 70 +++++----- .../src/StructureAdjustmentService.php | 3 +- 7 files changed, 210 insertions(+), 112 deletions(-) diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/TetheredNodes.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/TetheredNodes.feature index 8f74410ec2b..6b8aa2ea3cd 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/TetheredNodes.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/StructureAdjustment/TetheredNodes.feature @@ -10,6 +10,10 @@ Feature: Tethered Nodes integrity violations | language | en, de, gsw | gsw->de->en | And using the following node types: """yaml + 'Neos.ContentRepository:Root': + childNodes: + 'originally-tethered-node': + type: 'Neos.ContentRepository.Testing:Tethered' 'Neos.ContentRepository.Testing:Document': childNodes: 'tethered-node': @@ -27,59 +31,66 @@ Feature: Tethered Nodes integrity violations And using identifier "default", I define a content repository And I am in content repository "default" And the command CreateRootWorkspace is executed with payload: - | Key | Value | - | workspaceName | "live" | - | workspaceTitle | "Live" | - | workspaceDescription | "The live workspace" | - | newContentStreamId | "cs-identifier" | + | Key | Value | + | workspaceName | "live" | + | workspaceTitle | "Live" | + | workspaceDescription | "The live workspace" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the command CreateRootNodeAggregateWithNode is executed with payload: - | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "lady-eleonode-rootford" | - | nodeTypeName | "Neos.ContentRepository:Root" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | + | nodeTypeName | "Neos.ContentRepository:Root" | + | tetheredDescendantNodeAggregateIds | {"originally-tethered-node": "originode-tetherton"} | # We have to add another node since root nodes have no dimension space points and thus cannot be varied # Node /document And the event NodeAggregateWithNodeWasCreated was published with payload: - | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "sir-david-nodenborough" | - | nodeTypeName | "Neos.ContentRepository.Testing:Document" | - | originDimensionSpacePoint | {"market":"CH", "language":"gsw"} | - | coveredDimensionSpacePoints | [{"market":"CH", "language":"gsw"}] | - | parentNodeAggregateId | "lady-eleonode-rootford" | - | nodeName | "document" | - | nodeAggregateClassification | "regular" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | + | nodeTypeName | "Neos.ContentRepository.Testing:Document" | + | originDimensionSpacePoint | {"market":"CH", "language":"gsw"} | + | coveredDimensionSpacePoints | [{"market":"CH", "language":"gsw"}] | + | parentNodeAggregateId | "lady-eleonode-rootford" | + | nodeName | "document" | + | nodeAggregateClassification | "regular" | # We add a tethered child node to provide for test cases for node aggregates of that classification # Node /document/tethered-node And the event NodeAggregateWithNodeWasCreated was published with payload: - | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "nodewyn-tetherton" | - | nodeTypeName | "Neos.ContentRepository.Testing:Tethered" | - | originDimensionSpacePoint | {"market":"CH", "language":"gsw"} | - | coveredDimensionSpacePoints | [{"market":"CH", "language":"gsw"}] | - | parentNodeAggregateId | "sir-david-nodenborough" | - | nodeName | "tethered-node" | - | nodeAggregateClassification | "tethered" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodewyn-tetherton" | + | nodeTypeName | "Neos.ContentRepository.Testing:Tethered" | + | originDimensionSpacePoint | {"market":"CH", "language":"gsw"} | + | coveredDimensionSpacePoints | [{"market":"CH", "language":"gsw"}] | + | parentNodeAggregateId | "sir-david-nodenborough" | + | nodeName | "tethered-node" | + | nodeAggregateClassification | "tethered" | # We add a tethered grandchild node to provide for test cases that this works recursively # Node /document/tethered-node/tethered-leaf And the event NodeAggregateWithNodeWasCreated was published with payload: - | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "nodimer-tetherton" | - | nodeTypeName | "Neos.ContentRepository.Testing:TetheredLeaf" | - | originDimensionSpacePoint | {"market":"CH", "language":"gsw"} | - | coveredDimensionSpacePoints | [{"market":"CH", "language":"gsw"}] | - | parentNodeAggregateId | "nodewyn-tetherton" | - | nodeName | "tethered-leaf" | - | nodeAggregateClassification | "tethered" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nodimer-tetherton" | + | nodeTypeName | "Neos.ContentRepository.Testing:TetheredLeaf" | + | originDimensionSpacePoint | {"market":"CH", "language":"gsw"} | + | coveredDimensionSpacePoints | [{"market":"CH", "language":"gsw"}] | + | parentNodeAggregateId | "nodewyn-tetherton" | + | nodeName | "tethered-leaf" | + | nodeAggregateClassification | "tethered" | And the graph projection is fully up to date Then I expect no needed structure adjustments for type "Neos.ContentRepository.Testing:Document" Scenario: Adjusting the schema adding a new tethered node leads to a MissingTetheredNode integrity violation Given I change the node types in content repository "default" to: """yaml + 'Neos.ContentRepository:Root': + childNodes: + 'originally-tethered-node': + type: 'Neos.ContentRepository.Testing:Tethered' + 'tethered-node': + type: 'Neos.ContentRepository.Testing:Tethered' 'Neos.ContentRepository.Testing:Document': childNodes: 'tethered-node': @@ -97,13 +108,21 @@ Feature: Tethered Nodes integrity violations 'Neos.ContentRepository.Testing:TetheredLeaf': [] """ Then I expect the following structure adjustments for type "Neos.ContentRepository.Testing:Document": - | Type | nodeAggregateId | - | TETHERED_NODE_MISSING | sir-david-nodenborough | - + | Type | nodeAggregateId | + | TETHERED_NODE_MISSING | sir-david-nodenborough | + And I expect the following structure adjustments for type "Neos.ContentRepository:Root": + | Type | nodeAggregateId | + | TETHERED_NODE_MISSING | lady-eleonode-rootford | Scenario: Adding missing tethered nodes resolves the corresponding integrity violations Given I change the node types in content repository "default" to: """yaml + 'Neos.ContentRepository:Root': + childNodes: + 'originally-tethered-node': + type: 'Neos.ContentRepository.Testing:Tethered' + 'tethered-node': + type: 'Neos.ContentRepository.Testing:Tethered' 'Neos.ContentRepository.Testing:Document': childNodes: 'tethered-node': @@ -122,12 +141,18 @@ Feature: Tethered Nodes integrity violations """ When I adjust the node structure for node type "Neos.ContentRepository.Testing:Document" Then I expect no needed structure adjustments for type "Neos.ContentRepository.Testing:Document" + When I adjust the node structure for node type "Neos.ContentRepository:Root" + Then I expect no needed structure adjustments for type "Neos.ContentRepository:Root" When I am in the active content stream of workspace "live" and dimension space point {"market":"CH", "language":"gsw"} And I get the node at path "document/some-new-child" And I expect this node to have the following properties: | Key | Value | | foo | "my default applied" | + And I get the node at path "tethered-node" + And I expect this node to have the following properties: + | Key | Value | + | foo | "my default applied" | Scenario: Adding the same Given I change the node types in content repository "default" to: @@ -149,13 +174,14 @@ Feature: Tethered Nodes integrity violations 'Neos.ContentRepository.Testing:TetheredLeaf': [] """ When I adjust the node structure for node type "Neos.ContentRepository.Testing:Document" - Then I expect exactly 6 events to be published on stream "ContentStream:cs-identifier" + Then I expect exactly 8 events to be published on stream "ContentStream:cs-identifier" When I adjust the node structure for node type "Neos.ContentRepository.Testing:Document" - Then I expect exactly 6 events to be published on stream "ContentStream:cs-identifier" + Then I expect exactly 8 events to be published on stream "ContentStream:cs-identifier" Scenario: Adjusting the schema removing a tethered node leads to a DisallowedTetheredNode integrity violation (which can be fixed) Given I change the node types in content repository "default" to: """yaml + 'Neos.ContentRepository:Root': [] 'Neos.ContentRepository.Testing:Document': [] 'Neos.ContentRepository.Testing:Tethered': properties: @@ -168,13 +194,19 @@ Feature: Tethered Nodes integrity violations 'Neos.ContentRepository.Testing:TetheredLeaf': [] """ Then I expect the following structure adjustments for type "Neos.ContentRepository.Testing:Document": - | Type | nodeAggregateId | - | DISALLOWED_TETHERED_NODE | nodewyn-tetherton | + | Type | nodeAggregateId | + | DISALLOWED_TETHERED_NODE | nodewyn-tetherton | + Then I expect the following structure adjustments for type "Neos.ContentRepository:Root": + | Type | nodeAggregateId | + | DISALLOWED_TETHERED_NODE | originode-tetherton | When I adjust the node structure for node type "Neos.ContentRepository.Testing:Document" Then I expect no needed structure adjustments for type "Neos.ContentRepository.Testing:Document" + When I adjust the node structure for node type "Neos.ContentRepository:Root" + Then I expect no needed structure adjustments for type "Neos.ContentRepository:Root" When I am in content stream "cs-identifier" and dimension space point {"market":"CH", "language":"gsw"} Then I expect node aggregate identifier "nodewyn-tetherton" to lead to no node Then I expect node aggregate identifier "nodimer-tetherton" to lead to no node + And I expect path "tethered-node" to lead to no node Scenario: Adjusting the schema changing the type of a tethered node leads to a InvalidTetheredNodeType integrity violation Given I change the node types in content repository "default" to: @@ -194,6 +226,6 @@ Feature: Tethered Nodes integrity violations 'Neos.ContentRepository.Testing:TetheredLeaf': [] """ Then I expect the following structure adjustments for type "Neos.ContentRepository.Testing:Document": - | Type | nodeAggregateId | - | TETHERED_NODE_TYPE_WRONG | nodewyn-tetherton | + | Type | nodeAggregateId | + | TETHERED_NODE_TYPE_WRONG | nodewyn-tetherton | diff --git a/Neos.ContentRepository.Core/Classes/Feature/Common/TetheredNodeInternals.php b/Neos.ContentRepository.Core/Classes/Feature/Common/TetheredNodeInternals.php index f52aac87f55..ba8ff204f27 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/Common/TetheredNodeInternals.php +++ b/Neos.ContentRepository.Core/Classes/Feature/Common/TetheredNodeInternals.php @@ -18,6 +18,7 @@ use Neos\ContentRepository\Core\EventStore\Events; use Neos\ContentRepository\Core\Feature\NodeCreation\Event\NodeAggregateWithNodeWasCreated; use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues; +use Neos\ContentRepository\Core\Feature\NodeVariation\Event\NodePeerVariantWasCreated; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; @@ -26,7 +27,6 @@ use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\NodeType\NodeType; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\SharedModel\User\UserId; use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; /** @@ -54,15 +54,15 @@ abstract protected function createEventsForVariations( */ protected function createEventsForMissingTetheredNode( NodeAggregate $parentNodeAggregate, - Node $parentNode, + OriginDimensionSpacePoint $originDimensionSpacePoint, NodeName $tetheredNodeName, ?NodeAggregateId $tetheredNodeAggregateId, NodeType $expectedTetheredNodeType, ContentRepository $contentRepository ): Events { $childNodeAggregates = $contentRepository->getContentGraph()->findChildNodeAggregatesByName( - $parentNode->subgraphIdentity->contentStreamId, - $parentNode->nodeAggregateId, + $parentNodeAggregate->contentStreamId, + $parentNodeAggregate->nodeAggregateId, $tetheredNodeName ); @@ -75,19 +75,53 @@ protected function createEventsForMissingTetheredNode( if (count($childNodeAggregates) === 0) { // there is no tethered child node aggregate already; let's create it! - return Events::with( - new NodeAggregateWithNodeWasCreated( - $parentNode->subgraphIdentity->contentStreamId, - $tetheredNodeAggregateId ?: NodeAggregateId::create(), - $expectedTetheredNodeType->name, - $parentNode->originDimensionSpacePoint, - $parentNodeAggregate->getCoverageByOccupant($parentNode->originDimensionSpacePoint), - $parentNode->nodeAggregateId, - $tetheredNodeName, - SerializedPropertyValues::defaultFromNodeType($expectedTetheredNodeType), - NodeAggregateClassification::CLASSIFICATION_TETHERED, - ) - ); + $nodeType = $this->nodeTypeManager->getNodeType($parentNodeAggregate->nodeTypeName); + if ($nodeType->isOfType(NodeTypeName::ROOT_NODE_TYPE_NAME)) { + $events = []; + $tetheredNodeAggregateId = $tetheredNodeAggregateId ?: NodeAggregateId::create(); + // we create in one origin DSP and vary in the others + $creationOriginDimensionSpacePoint = null; + foreach ($this->getInterDimensionalVariationGraph()->getRootGeneralizations() as $rootGeneralization) { + $rootGeneralizationOrigin = OriginDimensionSpacePoint::fromDimensionSpacePoint($rootGeneralization); + if ($creationOriginDimensionSpacePoint) { + $events[] = new NodePeerVariantWasCreated( + $parentNodeAggregate->contentStreamId, + $tetheredNodeAggregateId, + $creationOriginDimensionSpacePoint, + $rootGeneralizationOrigin, + $this->getInterDimensionalVariationGraph()->getSpecializationSet($rootGeneralization) + ); + } else { + $events[] = new NodeAggregateWithNodeWasCreated( + $parentNodeAggregate->contentStreamId, + $tetheredNodeAggregateId, + $expectedTetheredNodeType->name, + $rootGeneralizationOrigin, + $this->getInterDimensionalVariationGraph()->getSpecializationSet($rootGeneralization), + $parentNodeAggregate->nodeAggregateId, + $tetheredNodeName, + SerializedPropertyValues::defaultFromNodeType($expectedTetheredNodeType), + NodeAggregateClassification::CLASSIFICATION_TETHERED, + ); + $creationOriginDimensionSpacePoint = $rootGeneralizationOrigin; + } + } + return Events::fromArray($events); + } else { + return Events::with( + new NodeAggregateWithNodeWasCreated( + $parentNodeAggregate->contentStreamId, + $tetheredNodeAggregateId ?: NodeAggregateId::create(), + $expectedTetheredNodeType->name, + $originDimensionSpacePoint, + $parentNodeAggregate->getCoverageByOccupant($originDimensionSpacePoint), + $parentNodeAggregate->nodeAggregateId, + $tetheredNodeName, + SerializedPropertyValues::defaultFromNodeType($expectedTetheredNodeType), + NodeAggregateClassification::CLASSIFICATION_TETHERED, + ) + ); + } } elseif (count($childNodeAggregates) === 1) { /** @var NodeAggregate $childNodeAggregate */ $childNodeAggregate = current($childNodeAggregates); @@ -106,9 +140,9 @@ protected function createEventsForMissingTetheredNode( } /** @var Node $childNodeSource Node aggregates are never empty */ return $this->createEventsForVariations( - $parentNode->subgraphIdentity->contentStreamId, + $parentNodeAggregate->contentStreamId, $childNodeSource->originDimensionSpacePoint, - $parentNode->originDimensionSpacePoint, + $originDimensionSpacePoint, $parentNodeAggregate, $contentRepository ); diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/NodeTypeChange.php b/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/NodeTypeChange.php index 16306a537e8..0f68cba7042 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/NodeTypeChange.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeTypeChange/NodeTypeChange.php @@ -16,6 +16,7 @@ use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; +use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePointSet; use Neos\ContentRepository\Core\EventStore\Events; use Neos\ContentRepository\Core\EventStore\EventsToPublish; @@ -90,7 +91,7 @@ abstract protected function areNodeTypeConstraintsImposedByGrandparentValid( abstract protected function createEventsForMissingTetheredNode( NodeAggregate $parentNodeAggregate, - Node $parentNode, + OriginDimensionSpacePoint $originDimensionSpacePoint, NodeName $tetheredNodeName, NodeAggregateId $tetheredNodeAggregateId, NodeType $expectedTetheredNodeType, @@ -206,7 +207,7 @@ private function handleChangeNodeAggregateType( ?: NodeAggregateId::create(); array_push($events, ...iterator_to_array($this->createEventsForMissingTetheredNode( $nodeAggregate, - $node, + $node->originDimensionSpacePoint, $tetheredNodeName, $tetheredNodeAggregateId, $expectedTetheredNodeType, diff --git a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/DimensionAdjustment.php b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/DimensionAdjustment.php index 08af46c972a..38d0c604d20 100644 --- a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/DimensionAdjustment.php +++ b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/DimensionAdjustment.php @@ -6,26 +6,27 @@ use Neos\ContentRepository\Core\DimensionSpace\InterDimensionalVariationGraph; use Neos\ContentRepository\Core\DimensionSpace\VariantType; +use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\NodeType\NodeTypeName; class DimensionAdjustment { - protected ProjectedNodeIterator $projectedNodeIterator; - protected InterDimensionalVariationGraph $interDimensionalVariationGraph; - public function __construct( - ProjectedNodeIterator $projectedNodeIterator, - InterDimensionalVariationGraph $interDimensionalVariationGraph + protected ProjectedNodeIterator $projectedNodeIterator, + protected InterDimensionalVariationGraph $interDimensionalVariationGraph, + protected NodeTypeManager $nodeTypeManager, ) { - $this->projectedNodeIterator = $projectedNodeIterator; - $this->interDimensionalVariationGraph = $interDimensionalVariationGraph; } /** - * @return \Generator<int,StructureAdjustment> + * @return iterable<int,StructureAdjustment> */ - public function findAdjustmentsForNodeType(NodeTypeName $nodeTypeName): \Generator + public function findAdjustmentsForNodeType(NodeTypeName $nodeTypeName): iterable { + $nodeType = $this->nodeTypeManager->getNodeType($nodeTypeName); + if ($nodeType->isOfType(NodeTypeName::ROOT_NODE_TYPE_NAME)) { + return []; + } foreach ($this->projectedNodeIterator->nodeAggregatesOfType($nodeTypeName) as $nodeAggregate) { foreach ($nodeAggregate->getNodes() as $node) { foreach ( diff --git a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/StructureAdjustment.php b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/StructureAdjustment.php index d532e0232fc..b2ba0668007 100644 --- a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/StructureAdjustment.php +++ b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/StructureAdjustment.php @@ -4,8 +4,11 @@ namespace Neos\ContentRepository\StructureAdjustment\Adjustment; +use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\Error\Messages\Message; final class StructureAdjustment extends Message @@ -41,8 +44,10 @@ private function __construct( $this->type = $type; } - public static function createForNode( - Node $node, + public static function createForNodeIdentity( + ContentStreamId $contentStreamId, + OriginDimensionSpacePoint $originDimensionSpacePoint, + NodeAggregateId $nodeAggregateId, string $type, string $errorMessage, ?\Closure $remediation = null @@ -52,9 +57,9 @@ public static function createForNode( . ($remediation ? '' : '!!!NOT AUTO-FIXABLE YET!!! ') . $errorMessage, null, [ - 'contentStream' => $node->subgraphIdentity->contentStreamId->value, - 'dimensionSpacePoint' => $node->originDimensionSpacePoint->toJson(), - 'nodeAggregateId' => $node->nodeAggregateId->value, + 'contentStream' => $contentStreamId->value, + 'dimensionSpacePoint' => $originDimensionSpacePoint->toJson(), + 'nodeAggregateId' => $nodeAggregateId->value, 'isAutoFixable' => ($remediation !== null) ], $type, @@ -62,6 +67,22 @@ public static function createForNode( ); } + public static function createForNode( + Node $node, + string $type, + string $errorMessage, + ?\Closure $remediation = null + ): self { + return self::createForNodeIdentity( + $node->subgraphIdentity->contentStreamId, + $node->originDimensionSpacePoint, + $node->nodeAggregateId, + $type, + $errorMessage, + $remediation + ); + } + public static function createForNodeAggregate( NodeAggregate $nodeAggregate, string $type, diff --git a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/TetheredNodeAdjustments.php b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/TetheredNodeAdjustments.php index 994672b390e..45ad49d7129 100644 --- a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/TetheredNodeAdjustments.php +++ b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/TetheredNodeAdjustments.php @@ -11,6 +11,7 @@ use Neos\ContentRepository\Core\Feature\NodeMove\Dto\CoverageNodeMoveMappings; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindChildNodesFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\Feature\NodeMove\Event\NodeAggregateWasMoved; use Neos\ContentRepository\Core\Feature\Common\TetheredNodeInternals; @@ -51,46 +52,52 @@ public function findAdjustmentsForNodeType(NodeTypeName $nodeTypeName): \Generat // In case we cannot find the expected tethered nodes, this fix cannot do anything. return; } - $expectedTetheredNodes = $this->nodeTypeManager->getTetheredNodesConfigurationForNodeType($this->nodeTypeManager->getNodeType($nodeTypeName)); + $nodeType = $this->nodeTypeManager->getNodeType($nodeTypeName); + $expectedTetheredNodes = $this->nodeTypeManager->getTetheredNodesConfigurationForNodeType($nodeType); foreach ($this->projectedNodeIterator->nodeAggregatesOfType($nodeTypeName) as $nodeAggregate) { // find missing tethered nodes $foundMissingOrDisallowedTetheredNodes = false; - foreach ($nodeAggregate->getNodes() as $node) { - assert($node instanceof Node); + $originDimensionSpacePoints = $nodeType->isOfType(NodeTypeName::ROOT_NODE_TYPE_NAME) + ? DimensionSpace\OriginDimensionSpacePointSet::fromDimensionSpacePointSet( + DimensionSpace\DimensionSpacePointSet::fromArray($this->getInterDimensionalVariationGraph()->getRootGeneralizations()) + ) + : $nodeAggregate->occupiedDimensionSpacePoints; + + foreach ($originDimensionSpacePoints as $originDimensionSpacePoint) { foreach ($expectedTetheredNodes as $tetheredNodeName => $expectedTetheredNodeType) { $tetheredNodeName = NodeName::fromString($tetheredNodeName); $subgraph = $this->contentRepository->getContentGraph()->getSubgraph( - $node->subgraphIdentity->contentStreamId, - $node->originDimensionSpacePoint->toDimensionSpacePoint(), + $nodeAggregate->contentStreamId, + $originDimensionSpacePoint->toDimensionSpacePoint(), VisibilityConstraints::withoutRestrictions() ); $tetheredNode = $subgraph->findChildNodeConnectedThroughEdgeName( - $node->nodeAggregateId, + $nodeAggregate->nodeAggregateId, $tetheredNodeName ); if ($tetheredNode === null) { $foundMissingOrDisallowedTetheredNodes = true; // $nestedNode not found // - so a tethered node is missing in the OriginDimensionSpacePoint of the $node - yield StructureAdjustment::createForNode( - $node, + yield StructureAdjustment::createForNodeIdentity( + $nodeAggregate->contentStreamId, + $originDimensionSpacePoint, + $nodeAggregate->nodeAggregateId, StructureAdjustment::TETHERED_NODE_MISSING, 'The tethered child node "' . $tetheredNodeName->value . '" is missing.', - function () use ($nodeAggregate, $node, $tetheredNodeName, $expectedTetheredNodeType) { + function () use ($nodeAggregate, $originDimensionSpacePoint, $tetheredNodeName, $expectedTetheredNodeType) { $events = $this->createEventsForMissingTetheredNode( $nodeAggregate, - $node, + $originDimensionSpacePoint, $tetheredNodeName, null, $expectedTetheredNodeType, $this->contentRepository ); - $streamName = ContentStreamEventStreamName::fromContentStreamId( - $node->subgraphIdentity->contentStreamId - ); + $streamName = ContentStreamEventStreamName::fromContentStreamId($nodeAggregate->contentStreamId); return new EventsToPublish( $streamName->getEventStreamName(), $events, @@ -128,14 +135,13 @@ function () use ($tetheredNodeAggregate) { // find wrongly ordered tethered nodes if ($foundMissingOrDisallowedTetheredNodes === false) { - foreach ($nodeAggregate->getNodes() as $node) { - assert($node instanceof Node); + foreach ($originDimensionSpacePoints as $originDimensionSpacePoint) { $subgraph = $this->contentRepository->getContentGraph()->getSubgraph( - $node->subgraphIdentity->contentStreamId, - $node->originDimensionSpacePoint->toDimensionSpacePoint(), + $nodeAggregate->contentStreamId, + $originDimensionSpacePoint->toDimensionSpacePoint(), VisibilityConstraints::withoutRestrictions() ); - $childNodes = $subgraph->findChildNodes($node->nodeAggregateId, FindChildNodesFilter::create()); + $childNodes = $subgraph->findChildNodes($nodeAggregate->nodeAggregateId, FindChildNodesFilter::create()); /** is indexed by node name, and the value is the tethered node itself */ $actualTetheredChildNodes = []; @@ -147,21 +153,22 @@ function () use ($tetheredNodeAggregate) { if (array_keys($actualTetheredChildNodes) !== array_keys($expectedTetheredNodes)) { // we need to re-order: We go from the last to the first - yield StructureAdjustment::createForNode( - $node, + yield StructureAdjustment::createForNodeIdentity( + $nodeAggregate->contentStreamId, + $originDimensionSpacePoint, + $nodeAggregate->nodeAggregateId, StructureAdjustment::TETHERED_NODE_WRONGLY_ORDERED, 'Tethered nodes wrongly ordered, expected: ' . implode(', ', array_keys($expectedTetheredNodes)) . ' - actual: ' . implode(', ', array_keys($actualTetheredChildNodes)), - function () use ($node, $actualTetheredChildNodes, $expectedTetheredNodes) { - return $this->reorderNodes( - $node->subgraphIdentity->contentStreamId, - $node, - $actualTetheredChildNodes, - array_keys($expectedTetheredNodes) - ); - } + fn () => $this->reorderNodes( + $nodeAggregate->contentStreamId, + $nodeAggregate->nodeAggregateId, + $originDimensionSpacePoint, + $actualTetheredChildNodes, + array_keys($expectedTetheredNodes) + ) ); } } @@ -210,7 +217,8 @@ protected function getInterDimensionalVariationGraph(): DimensionSpace\InterDime */ private function reorderNodes( ContentStreamId $contentStreamId, - Node $parentNode, + NodeAggregateId $parentNodeAggregateId, + DimensionSpace\OriginDimensionSpacePoint $originDimensionSpacePoint, array $actualTetheredChildNodes, array $expectedNodeOrdering ): EventsToPublish { @@ -240,8 +248,8 @@ private function reorderNodes( $succeedingNode->nodeAggregateId, $succeedingNode->originDimensionSpacePoint, // we only change the order, not the parent -> so we can simply use the parent here. - $parentNode->nodeAggregateId, - $parentNode->originDimensionSpacePoint + $parentNodeAggregateId, + $originDimensionSpacePoint ) ) ) diff --git a/Neos.ContentRepository.StructureAdjustment/src/StructureAdjustmentService.php b/Neos.ContentRepository.StructureAdjustment/src/StructureAdjustmentService.php index a6fe7ec2018..f816d330232 100644 --- a/Neos.ContentRepository.StructureAdjustment/src/StructureAdjustmentService.php +++ b/Neos.ContentRepository.StructureAdjustment/src/StructureAdjustmentService.php @@ -60,7 +60,8 @@ public function __construct( ); $this->dimensionAdjustment = new DimensionAdjustment( $projectedNodeIterator, - $interDimensionalVariationGraph + $interDimensionalVariationGraph, + $nodeTypeManager ); } From 0f46fb00de9027f6f8866f6f88255430dedcda7f Mon Sep 17 00:00:00 2001 From: Bernhard Schmitt <schmitt@sitegeist.de> Date: Tue, 31 Oct 2023 18:00:02 +0100 Subject: [PATCH 25/53] 4663 - Catch missing node type in dimensions adjustment --- .../src/Adjustment/DimensionAdjustment.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/DimensionAdjustment.php b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/DimensionAdjustment.php index 38d0c604d20..2219f0b5210 100644 --- a/Neos.ContentRepository.StructureAdjustment/src/Adjustment/DimensionAdjustment.php +++ b/Neos.ContentRepository.StructureAdjustment/src/Adjustment/DimensionAdjustment.php @@ -8,6 +8,7 @@ use Neos\ContentRepository\Core\DimensionSpace\VariantType; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\NodeType\NodeTypeName; +use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFoundException; class DimensionAdjustment { @@ -23,7 +24,11 @@ public function __construct( */ public function findAdjustmentsForNodeType(NodeTypeName $nodeTypeName): iterable { - $nodeType = $this->nodeTypeManager->getNodeType($nodeTypeName); + try { + $nodeType = $this->nodeTypeManager->getNodeType($nodeTypeName); + } catch (NodeTypeNotFoundException) { + return []; + } if ($nodeType->isOfType(NodeTypeName::ROOT_NODE_TYPE_NAME)) { return []; } From 1e26367f157da90f31c5b3ed9c76aa0e64d42ac2 Mon Sep 17 00:00:00 2001 From: Jenkins <jenkins@neos.io> Date: Tue, 31 Oct 2023 17:34:47 +0000 Subject: [PATCH 26/53] TASK: Update references [skip ci] --- Neos.Neos/Documentation/References/CommandReference.rst | 2 +- Neos.Neos/Documentation/References/EelHelpersReference.rst | 2 +- .../Documentation/References/FlowQueryOperationReference.rst | 2 +- .../Documentation/References/Signals/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/Signals/Flow.rst | 2 +- Neos.Neos/Documentation/References/Signals/Media.rst | 2 +- Neos.Neos/Documentation/References/Signals/Neos.rst | 2 +- Neos.Neos/Documentation/References/Validators/Flow.rst | 2 +- Neos.Neos/Documentation/References/Validators/Media.rst | 2 +- Neos.Neos/Documentation/References/Validators/Party.rst | 2 +- .../Documentation/References/ViewHelpers/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Form.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Media.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Neos.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Neos.Neos/Documentation/References/CommandReference.rst b/Neos.Neos/Documentation/References/CommandReference.rst index db800a743dd..6cdc4a8006d 100644 --- a/Neos.Neos/Documentation/References/CommandReference.rst +++ b/Neos.Neos/Documentation/References/CommandReference.rst @@ -19,7 +19,7 @@ commands that may be available, use:: ./flow help -The following reference was automatically generated from code on 2023-10-30 +The following reference was automatically generated from code on 2023-10-31 .. _`Neos Command Reference: NEOS.CONTENTREPOSITORY`: diff --git a/Neos.Neos/Documentation/References/EelHelpersReference.rst b/Neos.Neos/Documentation/References/EelHelpersReference.rst index ef9a41d5ec3..e51fb110524 100644 --- a/Neos.Neos/Documentation/References/EelHelpersReference.rst +++ b/Neos.Neos/Documentation/References/EelHelpersReference.rst @@ -3,7 +3,7 @@ Eel Helpers Reference ===================== -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Eel Helpers Reference: Api`: diff --git a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst index b00941e25fb..7f5ed6f9a4b 100644 --- a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst +++ b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst @@ -3,7 +3,7 @@ FlowQuery Operation Reference ============================= -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`FlowQuery Operation Reference: add`: diff --git a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst index 427e9499787..255c6d56d7d 100644 --- a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository Signals Reference ==================================== -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Content Repository Signals Reference: Context (``Neos\ContentRepository\Domain\Service\Context``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Flow.rst b/Neos.Neos/Documentation/References/Signals/Flow.rst index 5cc7411beb5..9d72e37c545 100644 --- a/Neos.Neos/Documentation/References/Signals/Flow.rst +++ b/Neos.Neos/Documentation/References/Signals/Flow.rst @@ -3,7 +3,7 @@ Flow Signals Reference ====================== -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Flow Signals Reference: AbstractAdvice (``Neos\Flow\Aop\Advice\AbstractAdvice``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Media.rst b/Neos.Neos/Documentation/References/Signals/Media.rst index b86f113cb4f..2bff5dd6769 100644 --- a/Neos.Neos/Documentation/References/Signals/Media.rst +++ b/Neos.Neos/Documentation/References/Signals/Media.rst @@ -3,7 +3,7 @@ Media Signals Reference ======================= -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Media Signals Reference: AssetCollectionController (``Neos\Media\Browser\Controller\AssetCollectionController``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Neos.rst b/Neos.Neos/Documentation/References/Signals/Neos.rst index d67b163e8d5..84f16afe1e9 100644 --- a/Neos.Neos/Documentation/References/Signals/Neos.rst +++ b/Neos.Neos/Documentation/References/Signals/Neos.rst @@ -3,7 +3,7 @@ Neos Signals Reference ====================== -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Neos Signals Reference: AbstractCreate (``Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate``)`: diff --git a/Neos.Neos/Documentation/References/Validators/Flow.rst b/Neos.Neos/Documentation/References/Validators/Flow.rst index be27b8852ad..088a158282f 100644 --- a/Neos.Neos/Documentation/References/Validators/Flow.rst +++ b/Neos.Neos/Documentation/References/Validators/Flow.rst @@ -3,7 +3,7 @@ Flow Validator Reference ======================== -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Flow Validator Reference: AggregateBoundaryValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Media.rst b/Neos.Neos/Documentation/References/Validators/Media.rst index daa32be4523..1bf3dda1b50 100644 --- a/Neos.Neos/Documentation/References/Validators/Media.rst +++ b/Neos.Neos/Documentation/References/Validators/Media.rst @@ -3,7 +3,7 @@ Media Validator Reference ========================= -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Media Validator Reference: ImageOrientationValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Party.rst b/Neos.Neos/Documentation/References/Validators/Party.rst index 019af82d8bb..24d7154e1a5 100644 --- a/Neos.Neos/Documentation/References/Validators/Party.rst +++ b/Neos.Neos/Documentation/References/Validators/Party.rst @@ -3,7 +3,7 @@ Party Validator Reference ========================= -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Party Validator Reference: AimAddressValidator`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst index 63b58bea995..bf3133ca179 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository ViewHelper Reference ####################################### -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Content Repository ViewHelper Reference: PaginateViewHelper`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst index aaa1ecd7da7..549616fb937 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst @@ -3,7 +3,7 @@ FluidAdaptor ViewHelper Reference ################################# -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`FluidAdaptor ViewHelper Reference: f:debug`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst index 97f22e73474..7ce0a458e3e 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst @@ -3,7 +3,7 @@ Form ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Form ViewHelper Reference: neos.form:form`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst index ac0f131011f..8a151aeb8f2 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst @@ -3,7 +3,7 @@ Fusion ViewHelper Reference ########################### -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Fusion ViewHelper Reference: fusion:render`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst index 2088e00139b..41ef5999832 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst @@ -3,7 +3,7 @@ Media ViewHelper Reference ########################## -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Media ViewHelper Reference: neos.media:fileTypeIcon`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst index ca89fd6aa87..4d92f614eb4 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst @@ -3,7 +3,7 @@ Neos ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Neos ViewHelper Reference: neos:backend.authenticationProviderLabel`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst index 75758d9a5d4..0fad77472a3 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst @@ -3,7 +3,7 @@ TYPO3 Fluid ViewHelper Reference ################################ -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`TYPO3 Fluid ViewHelper Reference: f:alias`: From 9f7ee86d74d2126f8a3b7bace7334d9bcdba1cf2 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:10:26 +0100 Subject: [PATCH 27/53] TASK: Fixup for pr #4641 --- .../Features/Fusion/ContentCollection.feature | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/Neos.Neos/Tests/Behavior/Features/Fusion/ContentCollection.feature b/Neos.Neos/Tests/Behavior/Features/Fusion/ContentCollection.feature index ed84afac431..edadc686621 100644 --- a/Neos.Neos/Tests/Behavior/Features/Fusion/ContentCollection.feature +++ b/Neos.Neos/Tests/Behavior/Features/Fusion/ContentCollection.feature @@ -27,33 +27,33 @@ Feature: Tests for the "Neos.Neos:ContentCollection" Fusion prototype And the Fusion context node is "a" And the Fusion context request URI is "http://localhost" -# Scenario: missing Neos.Neos.ContentCollection node -# When I execute the following Fusion code: -# """fusion -# include: resource://Neos.Fusion/Private/Fusion/Root.fusion -# include: resource://Neos.Neos/Private/Fusion/Root.fusion -# -# test = Neos.Neos:ContentCollection -# """ -# Then I expect the following Fusion rendering error: -# """ -# No content collection of type Neos.Neos:ContentCollection could be found in the current node (/sites/a) or at the path "to-be-set-by-user". You might want to adjust your node type configuration and create the missing child node through the "./flow node:repair --node-type Neos.Neos:Test.DocumentType" command. -# """ -# -# Scenario: invalid nodePath -# When I execute the following Fusion code: -# """fusion -# include: resource://Neos.Fusion/Private/Fusion/Root.fusion -# include: resource://Neos.Neos/Private/Fusion/Root.fusion -# -# test = Neos.Neos:ContentCollection { -# nodePath = 'invalid' -# } -# """ -# Then I expect the following Fusion rendering error: -# """ -# No content collection of type Neos.Neos:ContentCollection could be found in the current node (/sites/a) or at the path "invalid". You might want to adjust your node type configuration and create the missing child node through the "./flow node:repair --node-type Neos.Neos:Test.DocumentType" command. -# """ + Scenario: missing Neos.Neos.ContentCollection node + When I execute the following Fusion code: + """fusion + include: resource://Neos.Fusion/Private/Fusion/Root.fusion + include: resource://Neos.Neos/Private/Fusion/Root.fusion + + test = Neos.Neos:ContentCollection + """ + Then I expect the following Fusion rendering error: + """ + No content collection of type Neos.Neos:ContentCollection could be found in the current node (/sites/a) or at the path "to-be-set-by-user". You might want to adjust your node type configuration and create the missing child node through the "./flow node:repair --node-type Neos.Neos:Test.DocumentType" command. + """ + + Scenario: invalid nodePath + When I execute the following Fusion code: + """fusion + include: resource://Neos.Fusion/Private/Fusion/Root.fusion + include: resource://Neos.Neos/Private/Fusion/Root.fusion + + test = Neos.Neos:ContentCollection { + nodePath = 'invalid' + } + """ + Then I expect the following Fusion rendering error: + """ + No content collection of type Neos.Neos:ContentCollection could be found in the current node (/sites/a) or at the path "invalid". You might want to adjust your node type configuration and create the missing child node through the "./flow node:repair --node-type Neos.Neos:Test.DocumentType" command. + """ Scenario: empty ContentCollection When I execute the following Fusion code: From ef540d8443def79a21681bbe4005c4b777f9e803 Mon Sep 17 00:00:00 2001 From: Jenkins <jenkins@neos.io> Date: Tue, 31 Oct 2023 18:12:16 +0000 Subject: [PATCH 28/53] TASK: Update references [skip ci] --- Neos.Neos/Documentation/References/CommandReference.rst | 2 +- Neos.Neos/Documentation/References/EelHelpersReference.rst | 2 +- .../Documentation/References/FlowQueryOperationReference.rst | 2 +- .../Documentation/References/Signals/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/Signals/Flow.rst | 2 +- Neos.Neos/Documentation/References/Signals/Media.rst | 2 +- Neos.Neos/Documentation/References/Signals/Neos.rst | 2 +- Neos.Neos/Documentation/References/Validators/Flow.rst | 2 +- Neos.Neos/Documentation/References/Validators/Media.rst | 2 +- Neos.Neos/Documentation/References/Validators/Party.rst | 2 +- .../Documentation/References/ViewHelpers/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Form.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Media.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Neos.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Neos.Neos/Documentation/References/CommandReference.rst b/Neos.Neos/Documentation/References/CommandReference.rst index 26610f8ca47..9d6d214ff65 100644 --- a/Neos.Neos/Documentation/References/CommandReference.rst +++ b/Neos.Neos/Documentation/References/CommandReference.rst @@ -19,7 +19,7 @@ commands that may be available, use:: ./flow help -The following reference was automatically generated from code on 2023-10-30 +The following reference was automatically generated from code on 2023-10-31 .. _`Neos Command Reference: NEOS.CONTENTREPOSITORY`: diff --git a/Neos.Neos/Documentation/References/EelHelpersReference.rst b/Neos.Neos/Documentation/References/EelHelpersReference.rst index 76349c2ab6d..ee20f863532 100644 --- a/Neos.Neos/Documentation/References/EelHelpersReference.rst +++ b/Neos.Neos/Documentation/References/EelHelpersReference.rst @@ -3,7 +3,7 @@ Eel Helpers Reference ===================== -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Eel Helpers Reference: Api`: diff --git a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst index b00941e25fb..7f5ed6f9a4b 100644 --- a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst +++ b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst @@ -3,7 +3,7 @@ FlowQuery Operation Reference ============================= -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`FlowQuery Operation Reference: add`: diff --git a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst index 427e9499787..255c6d56d7d 100644 --- a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository Signals Reference ==================================== -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Content Repository Signals Reference: Context (``Neos\ContentRepository\Domain\Service\Context``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Flow.rst b/Neos.Neos/Documentation/References/Signals/Flow.rst index 7cdacff934b..84d6aefe223 100644 --- a/Neos.Neos/Documentation/References/Signals/Flow.rst +++ b/Neos.Neos/Documentation/References/Signals/Flow.rst @@ -3,7 +3,7 @@ Flow Signals Reference ====================== -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Flow Signals Reference: AbstractAdvice (``Neos\Flow\Aop\Advice\AbstractAdvice``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Media.rst b/Neos.Neos/Documentation/References/Signals/Media.rst index b86f113cb4f..2bff5dd6769 100644 --- a/Neos.Neos/Documentation/References/Signals/Media.rst +++ b/Neos.Neos/Documentation/References/Signals/Media.rst @@ -3,7 +3,7 @@ Media Signals Reference ======================= -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Media Signals Reference: AssetCollectionController (``Neos\Media\Browser\Controller\AssetCollectionController``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Neos.rst b/Neos.Neos/Documentation/References/Signals/Neos.rst index 9abe6765be8..c1db8296650 100644 --- a/Neos.Neos/Documentation/References/Signals/Neos.rst +++ b/Neos.Neos/Documentation/References/Signals/Neos.rst @@ -3,7 +3,7 @@ Neos Signals Reference ====================== -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Neos Signals Reference: AbstractCreate (``Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate``)`: diff --git a/Neos.Neos/Documentation/References/Validators/Flow.rst b/Neos.Neos/Documentation/References/Validators/Flow.rst index c5aae5fbdc2..72e74a32150 100644 --- a/Neos.Neos/Documentation/References/Validators/Flow.rst +++ b/Neos.Neos/Documentation/References/Validators/Flow.rst @@ -3,7 +3,7 @@ Flow Validator Reference ======================== -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Flow Validator Reference: AggregateBoundaryValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Media.rst b/Neos.Neos/Documentation/References/Validators/Media.rst index daa32be4523..1bf3dda1b50 100644 --- a/Neos.Neos/Documentation/References/Validators/Media.rst +++ b/Neos.Neos/Documentation/References/Validators/Media.rst @@ -3,7 +3,7 @@ Media Validator Reference ========================= -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Media Validator Reference: ImageOrientationValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Party.rst b/Neos.Neos/Documentation/References/Validators/Party.rst index 019af82d8bb..24d7154e1a5 100644 --- a/Neos.Neos/Documentation/References/Validators/Party.rst +++ b/Neos.Neos/Documentation/References/Validators/Party.rst @@ -3,7 +3,7 @@ Party Validator Reference ========================= -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Party Validator Reference: AimAddressValidator`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst index 63b58bea995..bf3133ca179 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository ViewHelper Reference ####################################### -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Content Repository ViewHelper Reference: PaginateViewHelper`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst index aaa1ecd7da7..549616fb937 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst @@ -3,7 +3,7 @@ FluidAdaptor ViewHelper Reference ################################# -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`FluidAdaptor ViewHelper Reference: f:debug`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst index 97f22e73474..7ce0a458e3e 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst @@ -3,7 +3,7 @@ Form ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Form ViewHelper Reference: neos.form:form`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst index ac0f131011f..8a151aeb8f2 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst @@ -3,7 +3,7 @@ Fusion ViewHelper Reference ########################### -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Fusion ViewHelper Reference: fusion:render`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst index 2088e00139b..41ef5999832 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst @@ -3,7 +3,7 @@ Media ViewHelper Reference ########################## -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Media ViewHelper Reference: neos.media:fileTypeIcon`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst index ca89fd6aa87..4d92f614eb4 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst @@ -3,7 +3,7 @@ Neos ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`Neos ViewHelper Reference: neos:backend.authenticationProviderLabel`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst index 75758d9a5d4..0fad77472a3 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst @@ -3,7 +3,7 @@ TYPO3 Fluid ViewHelper Reference ################################ -This reference was automatically generated from code on 2023-10-30 +This reference was automatically generated from code on 2023-10-31 .. _`TYPO3 Fluid ViewHelper Reference: f:alias`: From d7c5aca196d2193f7a7138139db349d1f625cee3 Mon Sep 17 00:00:00 2001 From: Martin Ficzel <ficzel@sitegeist.de> Date: Tue, 31 Oct 2023 16:26:29 +0100 Subject: [PATCH 29/53] TASK: Adjust `Neos.Neos:BreadcrumbMenuItems` The prototype `Neos.Neos:BreadcrumbMenuItems` is now a standalone Component that does not inherit from `Neos.Neos:Menu` anymore. The Menu is used internally to calculate the MenuItems for the parent and the root. The following properties are supported by `Neos.Neos:BreadcrumbMenuItems`: - `maximumLevels` (integer) Restrict the maximum depth of items in the menu, defaults to `0` - `renderHiddenInIndex` (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to `false`. - `calculateItemStates` (boolean) activate the *expensive* calculation of item states defaults to `false` The following changes compared to the previous implementation are detected: - The root document has the state `active` when `calculateItemStates` is set - The current document will have an url in the MenuItem. You can abstain from rendering the state by checking wether `state == current` - Other properties of `Neos.Neos:Menu` are not supported anymore as we do not inherit from Menu anymore --- .../Fusion/MenuItemsImplementation.php | 36 ++++++++++---- .../References/NeosFusionReference.rst | 6 ++- .../Fusion/Prototypes/BreadcrumbMenu.fusion | 8 ++- .../Prototypes/BreadcrumbMenuItems.fusion | 34 +++++++------ .../Behavior/Features/Fusion/Menu.feature | 49 ++++++++++--------- 5 files changed, 81 insertions(+), 52 deletions(-) diff --git a/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php index f88a11120b7..f8de8a9ca01 100644 --- a/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php @@ -165,14 +165,18 @@ protected function buildItems(): array if (!is_null($this->getItemCollection())) { $items = []; foreach ($this->getItemCollection() as $node) { - $childSubtree = $subgraph->findSubtree( - $node->nodeAggregateId, - FindSubtreeFilter::create(nodeTypeConstraints: $this->getNodeTypeConstraints(), maximumLevels: $this->getMaximumLevels()) - ); - if ($childSubtree === null) { - continue; + if ($this->getMaximumLevels() > 0) { + $childSubtree = $subgraph->findSubtree( + $node->nodeAggregateId, + FindSubtreeFilter::create(nodeTypeConstraints: $this->getNodeTypeConstraints(), maximumLevels: $this->getMaximumLevels()) + ); + if ($childSubtree === null) { + continue; + } + $items[] = $this->buildMenuItemFromSubtree($childSubtree); + } else { + $items[] = $this->buildMenuItemFromNode($node); } - $items[] = $this->traverseChildren($childSubtree); } return $items; } @@ -189,17 +193,29 @@ protected function buildItems(): array if ($childSubtree === null) { return []; } - return $this->traverseChildren($childSubtree)->getChildren(); + return $this->buildMenuItemFromSubtree($childSubtree)->getChildren(); + } + + protected function buildMenuItemFromNode(Node $node): MenuItem + { + return new MenuItem( + $node, + $this->isCalculateItemStatesEnabled() ? $this->calculateItemState($node) : null, + $node->getLabel(), + 0, + [], + $this->buildUri($node) + ); } - protected function traverseChildren(Subtree $subtree): MenuItem + protected function buildMenuItemFromSubtree(Subtree $subtree): MenuItem { $children = []; foreach ($subtree->children as $childSubtree) { $node = $childSubtree->node; if (!$this->isNodeHidden($node)) { - $childNode = $this->traverseChildren($childSubtree); + $childNode = $this->buildMenuItemFromSubtree($childSubtree); $children[] = $childNode; } } diff --git a/Neos.Neos/Documentation/References/NeosFusionReference.rst b/Neos.Neos/Documentation/References/NeosFusionReference.rst index 742e8445eef..2f4aad1520e 100644 --- a/Neos.Neos/Documentation/References/NeosFusionReference.rst +++ b/Neos.Neos/Documentation/References/NeosFusionReference.rst @@ -1103,7 +1103,11 @@ Menu with absolute uris: Neos.Neos:BreadcrumbMenuItems ----------------------------- -Create a list of of menu-items for a breadcrumb (ancestor documents), based on :ref:`Neos_Neos__MenuItems`. +Create a list of of menu-items for the breadcrumb (ancestor documents). + +:maximumLevels: (integer) Restrict the maximum depth of items in the menu, defaults to ``0`` +:renderHiddenInIndex: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to ``false``. +:calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` Example:: diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion index 0a9b9fcc365..a93e64eccae 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion @@ -2,11 +2,15 @@ # prototype(Neos.Neos:BreadcrumbMenu) < prototype(Neos.Fusion:Component) { attributes = Neos.Fusion:DataStructure + maximumLevels = 0 + renderHiddenInIndex = false + calculateItemStates = false @private { items = Neos.Neos:BreadcrumbMenuItems { - @ignoreProperties = ${['attributes']} - @apply.props = ${props} + maximumLevels = ${props.maximumLevels} + renderHiddenInIndex = ${props.renderHiddenInIndex} + calculateItemStates = ${props.calculateItemStates} } } diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion index 3e66c9b455e..3a38f547737 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion @@ -1,19 +1,23 @@ -prototype(Neos.Neos:BreadcrumbMenuItems) < prototype(Neos.Neos:MenuItems) { - itemCollection = ${q(documentNode).parents('[instanceof Neos.Neos:Document]').get()} - maximumLevels = 0 +prototype(Neos.Neos:BreadcrumbMenuItems) < prototype(Neos.Fusion:Component) { + maximumLevels = 0 + renderHiddenInIndex = true + calculateItemStates = false - @process { - // Show always the current node, event when it is hidden in index - addCurrent = Neos.Fusion:Value { - currentItem = Neos.Neos:MenuItems { - calculateItemStates = ${props.calculateItemStates} - renderHiddenInIndex = true - maximumLevels = 0 - itemCollection = ${[documentNode]} - } - value = ${Array.concat(this.currentItem, value)} - } + renderer = Neos.Fusion:Value { + parentItems = Neos.Neos:MenuItems { + calculateItemStates = ${props.calculateItemStates} + renderHiddenInIndex = ${props.renderHiddenInIndex} + maximumLevels = ${props.maximumLevels} + itemCollection = ${Array.reverse(q(documentNode).parents('[instanceof Neos.Neos:Document]').get())} + } - reverseOrder = ${Array.reverse(value)} + currentItem = Neos.Neos:MenuItems { + calculateItemStates = ${props.calculateItemStates} + renderHiddenInIndex = true + maximumLevels = ${props.maximumLevels} + itemCollection = ${[documentNode]} } + + value = ${Array.concat(this.parentItems, this.currentItem)} + } } diff --git a/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature b/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature index ad7915da3b5..8b120f6e36f 100644 --- a/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature +++ b/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature @@ -507,27 +507,28 @@ Feature: Tests for the "Neos.Neos:Menu" and related Fusion prototypes </ul> """ -# NOTE: This scenario currently breaks because the "breadcrumb" class attribute is missing and the item states are different than expected "active" vs "normal" for homepage -# Scenario: BreadcrumbMenu -# When I execute the following Fusion code: -# """fusion -# include: resource://Neos.Fusion/Private/Fusion/Root.fusion -# include: resource://Neos.Neos/Private/Fusion/Root.fusion -# -# test = Neos.Neos:BreadcrumbMenu { -# # calculate menu item state to get Neos < 9 behavior -# calculateItemStates = true -# } -# """ -# Then I expect the following Fusion rendering result as HTML: -# """html -# <ul class="breadcrumb"> -# <li class="normal"> -# <a href="/" title="Neos.Neos:Test.DocumentType1">Neos.Neos:Test.DocumentType1</a> -# </li> -# <li class="active"> -# <a href="/a1" title="Neos.Neos:Test.DocumentType1">Neos.Neos:Test.DocumentType1 (a1)</a> -# </li> -# <li class="current">Neos.Neos:Test.DocumentType2a</li> -# </ul> -# """ + Scenario: BreadcrumbMenu + When I execute the following Fusion code: + """fusion + include: resource://Neos.Fusion/Private/Fusion/Root.fusion + include: resource://Neos.Neos/Private/Fusion/Root.fusion + + test = Neos.Neos:BreadcrumbMenu { + # calculate menu item state to get Neos < 9 behavior + calculateItemStates = true + } + """ + Then I expect the following Fusion rendering result as HTML: + """html + <ul> + <li class="active"> + <a href="/" title="Neos.Neos:Site">Neos.Neos:Site</a> + </li> + <li class="active"> + <a href="/a1" title="Neos.Neos:Test.DocumentType1">Neos.Neos:Test.DocumentType1</a> + </li> + <li class="current"> + <a href="/a1/a1a" title="Neos.Neos:Test.DocumentType2a">Neos.Neos:Test.DocumentType2a</a> + </li> + </ul> + """ From 24a6d99e03e12338e689d874045824e1d68df05d Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Wed, 1 Nov 2023 09:29:50 +0100 Subject: [PATCH 30/53] Revert "TASK: Legacy Asset extractor, handle if "unstructured" nodetype is not available" This reverts commit 9fce857f72e3ba60bf45732e3afd1637743c0434. --- .../Classes/NodeDataToAssetsProcessor.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToAssetsProcessor.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToAssetsProcessor.php index e47b522337c..0d60b591cee 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToAssetsProcessor.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToAssetsProcessor.php @@ -45,15 +45,15 @@ public function run(): ProcessorResult $numberOfErrors = 0; foreach ($this->nodeDataRows as $nodeDataRow) { $nodeTypeName = NodeTypeName::fromString($nodeDataRow['nodetype']); - if ($this->nodeTypeManager->hasNodeType($nodeTypeName)) { + try { $nodeType = $this->nodeTypeManager->getNodeType($nodeTypeName); - foreach ($nodeType->getProperties() as $nodeTypePropertyName => $nodeTypePropertyValue) { - $propertyTypes[$nodeTypePropertyName] = $nodeTypePropertyValue['type'] ?? null; - } - } else { - $this->dispatch(Severity::WARNING, 'The node type "%s" of node "%s" is not available. Falling back to "string" typed properties.', $nodeTypeName->value, $nodeDataRow['identifier']); - $propertyTypes = []; + } catch (NodeTypeNotFoundException $exception) { + $numberOfErrors ++; + $this->dispatch(Severity::ERROR, '%s. Node: "%s"', $exception->getMessage(), $nodeDataRow['identifier']); + continue; } + // HACK the following line is required in order to fully initialize the node type + $nodeType->getFullConfiguration(); try { $properties = json_decode($nodeDataRow['properties'], true, 512, JSON_THROW_ON_ERROR); } catch (\JsonException $exception) { @@ -62,7 +62,7 @@ public function run(): ProcessorResult continue; } foreach ($properties as $propertyName => $propertyValue) { - $propertyType = $propertyTypes[$propertyName] ?? 'string'; // string is the fallback, in case the property is not defined or the node type does not exist. + $propertyType = $nodeType->getPropertyType($propertyName); foreach ($this->extractAssetIdentifiers($propertyType, $propertyValue) as $assetId) { if (array_key_exists($assetId, $this->processedAssetIds)) { continue; From 5cc5f89da182bc55f72ce6152b8bb9ef3368337a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anke=20H=C3=A4slich?= <anke@neos.io> Date: Wed, 1 Nov 2023 10:11:32 +0100 Subject: [PATCH 31/53] TASK: Fix style ci --- Neos.Media/Classes/Domain/Service/AssetVariantGenerator.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Neos.Media/Classes/Domain/Service/AssetVariantGenerator.php b/Neos.Media/Classes/Domain/Service/AssetVariantGenerator.php index 77797c1a514..69d4c12e379 100644 --- a/Neos.Media/Classes/Domain/Service/AssetVariantGenerator.php +++ b/Neos.Media/Classes/Domain/Service/AssetVariantGenerator.php @@ -127,7 +127,6 @@ public function createVariant(AssetInterface $asset, string $presetIdentifier, s $createdVariant = null; $preset = $this->getVariantPresets()[$presetIdentifier] ?? null; if ($preset instanceof VariantPreset && $preset->matchesMediaType($asset->getMediaType())) { - $existingVariant = $asset->getVariant($presetIdentifier, $variantIdentifier); if ($existingVariant !== null) { return $existingVariant; From 7af08e48d3ee66231b139fd1cc93555d2e2ce65f Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:15:39 +0100 Subject: [PATCH 32/53] TASK: Fix unstructured node handling in legacy migration --- .../Classes/NodeDataToAssetsProcessor.php | 14 +++++++------- .../Classes/NodeDataToEventsProcessor.php | 14 +++++++++++--- .../Behavior/Bootstrap/FeatureContext.php | 2 +- .../Tests/Behavior/Features/Errors.feature | 4 ++-- .../Tests/Behavior/Features/Variants.feature | 19 ++++++++++--------- 5 files changed, 31 insertions(+), 22 deletions(-) diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToAssetsProcessor.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToAssetsProcessor.php index 0d60b591cee..f96db3b58cc 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToAssetsProcessor.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToAssetsProcessor.php @@ -44,16 +44,16 @@ public function run(): ProcessorResult { $numberOfErrors = 0; foreach ($this->nodeDataRows as $nodeDataRow) { + if ($nodeDataRow['path'] === '/sites') { + // the sites node has no properties and is unstructured + continue; + } $nodeTypeName = NodeTypeName::fromString($nodeDataRow['nodetype']); - try { - $nodeType = $this->nodeTypeManager->getNodeType($nodeTypeName); - } catch (NodeTypeNotFoundException $exception) { - $numberOfErrors ++; - $this->dispatch(Severity::ERROR, '%s. Node: "%s"', $exception->getMessage(), $nodeDataRow['identifier']); + if (!$this->nodeTypeManager->hasNodeType($nodeTypeName)) { + $this->dispatch(Severity::ERROR, 'The node type "%s" is not available. Node: "%s"', $nodeTypeName->value, $nodeDataRow['identifier']); continue; } - // HACK the following line is required in order to fully initialize the node type - $nodeType->getFullConfiguration(); + $nodeType = $this->nodeTypeManager->getNodeType($nodeTypeName); try { $properties = json_decode($nodeDataRow['properties'], true, 512, JSON_THROW_ON_ERROR); } catch (\JsonException $exception) { diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php index 4f8bb63a3e9..cc3ad13609b 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php @@ -256,16 +256,24 @@ public function processNodeDataWithoutFallbackToEmptyDimension(NodeAggregateId $ $nodeName = end($pathParts); assert($nodeName !== false); $nodeTypeName = NodeTypeName::fromString($nodeDataRow['nodetype']); - $nodeType = $this->nodeTypeManager->getNodeType($nodeTypeName); - $serializedPropertyValuesAndReferences = $this->extractPropertyValuesAndReferences($nodeDataRow, $nodeType); + + $nodeType = $this->nodeTypeManager->hasNodeType($nodeTypeName) ? $this->nodeTypeManager->getNodeType($nodeTypeName) : null; $isSiteNode = $nodeDataRow['parentpath'] === '/sites'; - if ($isSiteNode && !$nodeType->isOfType(NodeTypeNameFactory::NAME_SITE)) { + if ($isSiteNode && !$nodeType?->isOfType(NodeTypeNameFactory::NAME_SITE)) { throw new MigrationException(sprintf( 'The site node "%s" (type: "%s") must be of type "%s"', $nodeDataRow['identifier'], $nodeTypeName->value, NodeTypeNameFactory::NAME_SITE ), 1695801620); } + if (!$nodeType) { + $this->dispatch(Severity::ERROR, 'The node type "%s" is not available. Node: "%s"', $nodeTypeName->value, $nodeDataRow['identifier']); + return; + } + + $nodeType = $this->nodeTypeManager->getNodeType($nodeTypeName); + $serializedPropertyValuesAndReferences = $this->extractPropertyValuesAndReferences($nodeDataRow, $nodeType); + if ($this->isAutoCreatedChildNode($parentNodeAggregate->nodeTypeName, $nodeName) && !$this->visitedNodes->containsNodeAggregate($nodeAggregateId)) { // Create tethered node if the node was not found before. // If the node was already visited, we want to create a node variant (and keep the tethering status) diff --git a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Bootstrap/FeatureContext.php b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Bootstrap/FeatureContext.php index 53b87836684..32b714bbbb3 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Bootstrap/FeatureContext.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Bootstrap/FeatureContext.php @@ -193,7 +193,7 @@ public function iExpectTheFollowingEventsToBeExported(TableNode $table): void */ public function iExpectTheFollwingErrorsToBeLogged(TableNode $table): void { - Assert::assertSame($this->loggedErrors, $table->getColumn(0), 'Expected logged errors do not match'); + Assert::assertSame($table->getColumn(0), $this->loggedErrors, 'Expected logged errors do not match'); $this->loggedErrors = []; } diff --git a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Errors.feature b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Errors.feature index 33af167cd03..5058e8674d6 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Errors.feature +++ b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Errors.feature @@ -100,11 +100,11 @@ Feature: Exceptional cases during migrations When I have the following node data rows: | Identifier | Path | Properties | Node Type | | sites | /sites | | | - | a | /sites/a | not json | Some.Package:SomeNodeType | + | a | /sites/a | not json | Some.Package:Homepage | And I run the event migration Then I expect a MigrationError with the message """ - Failed to decode properties "not json" of node "a" (type: "Some.Package:SomeNodeType"): Could not convert database value "not json" to Doctrine Type flow_json_array + Failed to decode properties "not json" of node "a" (type: "Some.Package:Homepage"): Could not convert database value "not json" to Doctrine Type flow_json_array """ Scenario: Node variants with the same dimension diff --git a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Variants.feature b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Variants.feature index a0e35e8fc92..40ff8fca40a 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Variants.feature +++ b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Features/Variants.feature @@ -11,6 +11,7 @@ Feature: Migrating nodes with content dimensions 'Some.Package:Homepage': superTypes: 'Neos.Neos:Site': true + 'Some.Package:Thing': {} """ And using identifier "default", I define a content repository And I am in content repository "default" @@ -66,10 +67,10 @@ Feature: Migrating nodes with content dimensions | Identifier | Path | Node Type | Dimension Values | | sites | /sites | unstructured | | | site | /sites/site | Some.Package:Homepage | {"language": ["de"]} | - | a | /sites/site/a | unstructured | {"language": ["de"]} | - | a1 | /sites/site/a/a1 | unstructured | {"language": ["de"]} | - | b | /sites/site/b | unstructured | {"language": ["de"]} | - | a1 | /sites/site/b/a1 | unstructured | {"language": ["ch"]} | + | a | /sites/site/a | Some.Package:Thing | {"language": ["de"]} | + | a1 | /sites/site/a/a1 | Some.Package:Thing | {"language": ["de"]} | + | b | /sites/site/b | Some.Package:Thing | {"language": ["de"]} | + | a1 | /sites/site/b/a1 | Some.Package:Thing | {"language": ["ch"]} | And I run the event migration Then I expect the following events to be exported | Type | Payload | @@ -87,11 +88,11 @@ Feature: Migrating nodes with content dimensions | Identifier | Path | Node Type | Dimension Values | | sites | /sites | unstructured | | | site | /sites/site | Some.Package:Homepage | {"language": ["de"]} | - | a | /sites/site/a | unstructured | {"language": ["de"]} | - | a1 | /sites/site/a/a1 | unstructured | {"language": ["de"]} | - | b | /sites/site/b | unstructured | {"language": ["de"]} | - | a | /sites/site/b/a | unstructured | {"language": ["ch"]} | - | a1 | /sites/site/b/a/a1 | unstructured | {"language": ["ch"]} | + | a | /sites/site/a | Some.Package:Thing | {"language": ["de"]} | + | a1 | /sites/site/a/a1 | Some.Package:Thing | {"language": ["de"]} | + | b | /sites/site/b | Some.Package:Thing | {"language": ["de"]} | + | a | /sites/site/b/a | Some.Package:Thing | {"language": ["ch"]} | + | a1 | /sites/site/b/a/a1 | Some.Package:Thing | {"language": ["ch"]} | And I run the event migration Then I expect the following events to be exported | Type | Payload | From 5eff61f16a3a8a45d13d16f8c2f5056753db95b4 Mon Sep 17 00:00:00 2001 From: Jenkins <jenkins@neos.io> Date: Wed, 1 Nov 2023 10:23:25 +0000 Subject: [PATCH 33/53] TASK: Update references [skip ci] --- Neos.Neos/Documentation/References/CommandReference.rst | 2 +- Neos.Neos/Documentation/References/EelHelpersReference.rst | 2 +- .../Documentation/References/FlowQueryOperationReference.rst | 2 +- .../Documentation/References/Signals/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/Signals/Flow.rst | 2 +- Neos.Neos/Documentation/References/Signals/Media.rst | 2 +- Neos.Neos/Documentation/References/Signals/Neos.rst | 2 +- Neos.Neos/Documentation/References/Validators/Flow.rst | 2 +- Neos.Neos/Documentation/References/Validators/Media.rst | 2 +- Neos.Neos/Documentation/References/Validators/Party.rst | 2 +- .../Documentation/References/ViewHelpers/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Form.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Media.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Neos.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Neos.Neos/Documentation/References/CommandReference.rst b/Neos.Neos/Documentation/References/CommandReference.rst index 6cdc4a8006d..32c58f5c43f 100644 --- a/Neos.Neos/Documentation/References/CommandReference.rst +++ b/Neos.Neos/Documentation/References/CommandReference.rst @@ -19,7 +19,7 @@ commands that may be available, use:: ./flow help -The following reference was automatically generated from code on 2023-10-31 +The following reference was automatically generated from code on 2023-11-01 .. _`Neos Command Reference: NEOS.CONTENTREPOSITORY`: diff --git a/Neos.Neos/Documentation/References/EelHelpersReference.rst b/Neos.Neos/Documentation/References/EelHelpersReference.rst index e51fb110524..95b18b8f19f 100644 --- a/Neos.Neos/Documentation/References/EelHelpersReference.rst +++ b/Neos.Neos/Documentation/References/EelHelpersReference.rst @@ -3,7 +3,7 @@ Eel Helpers Reference ===================== -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Eel Helpers Reference: Api`: diff --git a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst index 7f5ed6f9a4b..313561e3f2d 100644 --- a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst +++ b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst @@ -3,7 +3,7 @@ FlowQuery Operation Reference ============================= -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`FlowQuery Operation Reference: add`: diff --git a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst index 255c6d56d7d..62af6be6d29 100644 --- a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository Signals Reference ==================================== -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Content Repository Signals Reference: Context (``Neos\ContentRepository\Domain\Service\Context``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Flow.rst b/Neos.Neos/Documentation/References/Signals/Flow.rst index 9d72e37c545..42be9bab0bb 100644 --- a/Neos.Neos/Documentation/References/Signals/Flow.rst +++ b/Neos.Neos/Documentation/References/Signals/Flow.rst @@ -3,7 +3,7 @@ Flow Signals Reference ====================== -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Flow Signals Reference: AbstractAdvice (``Neos\Flow\Aop\Advice\AbstractAdvice``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Media.rst b/Neos.Neos/Documentation/References/Signals/Media.rst index 2bff5dd6769..c85d2749301 100644 --- a/Neos.Neos/Documentation/References/Signals/Media.rst +++ b/Neos.Neos/Documentation/References/Signals/Media.rst @@ -3,7 +3,7 @@ Media Signals Reference ======================= -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Media Signals Reference: AssetCollectionController (``Neos\Media\Browser\Controller\AssetCollectionController``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Neos.rst b/Neos.Neos/Documentation/References/Signals/Neos.rst index 84f16afe1e9..121f6f90427 100644 --- a/Neos.Neos/Documentation/References/Signals/Neos.rst +++ b/Neos.Neos/Documentation/References/Signals/Neos.rst @@ -3,7 +3,7 @@ Neos Signals Reference ====================== -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Neos Signals Reference: AbstractCreate (``Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate``)`: diff --git a/Neos.Neos/Documentation/References/Validators/Flow.rst b/Neos.Neos/Documentation/References/Validators/Flow.rst index 088a158282f..f27c7162447 100644 --- a/Neos.Neos/Documentation/References/Validators/Flow.rst +++ b/Neos.Neos/Documentation/References/Validators/Flow.rst @@ -3,7 +3,7 @@ Flow Validator Reference ======================== -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Flow Validator Reference: AggregateBoundaryValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Media.rst b/Neos.Neos/Documentation/References/Validators/Media.rst index 1bf3dda1b50..4ab02a7bfcf 100644 --- a/Neos.Neos/Documentation/References/Validators/Media.rst +++ b/Neos.Neos/Documentation/References/Validators/Media.rst @@ -3,7 +3,7 @@ Media Validator Reference ========================= -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Media Validator Reference: ImageOrientationValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Party.rst b/Neos.Neos/Documentation/References/Validators/Party.rst index 24d7154e1a5..4a838dacc18 100644 --- a/Neos.Neos/Documentation/References/Validators/Party.rst +++ b/Neos.Neos/Documentation/References/Validators/Party.rst @@ -3,7 +3,7 @@ Party Validator Reference ========================= -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Party Validator Reference: AimAddressValidator`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst index bf3133ca179..096af561261 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository ViewHelper Reference ####################################### -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Content Repository ViewHelper Reference: PaginateViewHelper`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst index 549616fb937..8fd558f5957 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst @@ -3,7 +3,7 @@ FluidAdaptor ViewHelper Reference ################################# -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`FluidAdaptor ViewHelper Reference: f:debug`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst index 7ce0a458e3e..31197ac31f0 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst @@ -3,7 +3,7 @@ Form ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Form ViewHelper Reference: neos.form:form`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst index 8a151aeb8f2..9879c19d84d 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst @@ -3,7 +3,7 @@ Fusion ViewHelper Reference ########################### -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Fusion ViewHelper Reference: fusion:render`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst index 41ef5999832..895e7e0a245 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst @@ -3,7 +3,7 @@ Media ViewHelper Reference ########################## -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Media ViewHelper Reference: neos.media:fileTypeIcon`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst index 4d92f614eb4..a82cac259fe 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst @@ -3,7 +3,7 @@ Neos ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Neos ViewHelper Reference: neos:backend.authenticationProviderLabel`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst index 0fad77472a3..adfa88e2413 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst @@ -3,7 +3,7 @@ TYPO3 Fluid ViewHelper Reference ################################ -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`TYPO3 Fluid ViewHelper Reference: f:alias`: From c335717fcfeeeb796ca03453ceea899c13107c55 Mon Sep 17 00:00:00 2001 From: Martin Ficzel <ficzel@sitegeist.de> Date: Tue, 31 Oct 2023 19:48:22 +0100 Subject: [PATCH 34/53] TASK: Adjust `Neos.Neos:MenuItems` The starting point is now calculated from the cached list of ancestors and the lastLevel is respected again. The calculation of the ancestors will now includes all documents without further filtering. --- .../Fusion/MenuItemsImplementation.php | 168 +++++++----------- .../Behavior/Features/Fusion/Menu.feature | 165 +++++++++-------- 2 files changed, 153 insertions(+), 180 deletions(-) diff --git a/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php index f8de8a9ca01..c8f67bace29 100644 --- a/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php @@ -15,6 +15,8 @@ namespace Neos\Neos\Fusion; use Neos\ContentRepository\Core\NodeType\NodeTypeName; +use Neos\ContentRepository\Core\NodeType\NodeTypeNames; +use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\CountAncestorNodesFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindAncestorNodesFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindSubtreeFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; @@ -39,24 +41,18 @@ class MenuItemsImplementation extends AbstractMenuItemsImplementation /** * Internal cache for the startingPoint tsValue. - * - * @var Node */ - protected $startingPoint; + protected ?Node $startingPoint = null; /** * Internal cache for the lastLevel value. - * - * @var integer */ - protected $lastLevel; + protected ?int $lastLevel = null; /** * Internal cache for the maximumLevels tsValue. - * - * @var integer */ - protected $maximumLevels; + protected ?int $maximumLevels = null; /** * Internal cache for the ancestors aggregate ids of the currentNode. @@ -78,20 +74,16 @@ class MenuItemsImplementation extends AbstractMenuItemsImplementation * -1 = one level above the current page * -2 = two levels above the current page * ... - * - * @return integer */ - public function getEntryLevel() + public function getEntryLevel(): int { return $this->fusionValue('entryLevel'); } /** * NodeType filter for nodes displayed in menu - * - * @return string */ - public function getFilter() + public function getFilter(): string { $filter = $this->fusionValue('filter'); if ($filter === null) { @@ -103,10 +95,8 @@ public function getFilter() /** * Maximum number of levels which should be rendered in this menu. - * - * @return integer */ - public function getMaximumLevels() + public function getMaximumLevels(): int { if ($this->maximumLevels === null) { $this->maximumLevels = $this->fusionValue('maximumLevels'); @@ -120,10 +110,8 @@ public function getMaximumLevels() /** * Return evaluated lastLevel value. - * - * @return integer */ - public function getLastLevel(): int + public function getLastLevel(): ?int { if ($this->lastLevel === null) { $this->lastLevel = $this->fusionValue('lastLevel'); @@ -168,12 +156,12 @@ protected function buildItems(): array if ($this->getMaximumLevels() > 0) { $childSubtree = $subgraph->findSubtree( $node->nodeAggregateId, - FindSubtreeFilter::create(nodeTypeConstraints: $this->getNodeTypeConstraints(), maximumLevels: $this->getMaximumLevels()) + FindSubtreeFilter::create(nodeTypeConstraints: $this->getNodeTypeConstraints(), maximumLevels: $this->getMaximumLevels() - 1) ); if ($childSubtree === null) { continue; } - $items[] = $this->buildMenuItemFromSubtree($childSubtree); + $items[] = $this->buildMenuItemFromSubtree($childSubtree, 1); } else { $items[] = $this->buildMenuItemFromNode($node); } @@ -181,14 +169,42 @@ protected function buildItems(): array return $items; } - $entryParentNode = $this->findMenuStartingPoint(); - if (!$entryParentNode) { + $entryParentNodeAggregateId = $this->findMenuStartingPointAggregateId(); + if (!$entryParentNodeAggregateId) { return []; } + $maximumLevels = $this->getMaximumLevels(); + $lastLevels = $this->getLastLevel(); + if ($lastLevels !== 0) { + $depthOfEntryParentNodeAggregateId = $subgraph->countAncestorNodes( + $entryParentNodeAggregateId, + CountAncestorNodesFilter::create( + NodeTypeConstraints::createWithAllowedNodeTypeNames( + NodeTypeNames::with( + NodeTypeNameFactory::forDocument() + ) + ) + ) + ); + + if ($lastLevels > 0) { + $maxLevelsBasedOnLastLevel = max($lastLevels - $depthOfEntryParentNodeAggregateId, 0); + $maximumLevels = min($maximumLevels, $maxLevelsBasedOnLastLevel); + } elseif ($lastLevels < 0) { + $currentNodeAncestorAggregateIds = $this->getCurrentNodeAncestorAggregateIds(); + $depthOfCurrentDocument = count(iterator_to_array($currentNodeAncestorAggregateIds)); + $maxLevelsBasedOnLastLevel = max($depthOfCurrentDocument + $lastLevels - $depthOfEntryParentNodeAggregateId + 1, 0); + $maximumLevels = min($maximumLevels, $maxLevelsBasedOnLastLevel); + } + } + $childSubtree = $subgraph->findSubtree( - $entryParentNode->nodeAggregateId, - FindSubtreeFilter::create(nodeTypeConstraints: $this->getNodeTypeConstraints(), maximumLevels: $this->getMaximumLevels()) + $entryParentNodeAggregateId, + FindSubtreeFilter::create( + nodeTypeConstraints: $this->getNodeTypeConstraints(), + maximumLevels: $maximumLevels + ) ); if ($childSubtree === null) { return []; @@ -208,14 +224,14 @@ protected function buildMenuItemFromNode(Node $node): MenuItem ); } - protected function buildMenuItemFromSubtree(Subtree $subtree): MenuItem + protected function buildMenuItemFromSubtree(Subtree $subtree, int $startLevel = 0): MenuItem { $children = []; foreach ($subtree->children as $childSubtree) { $node = $childSubtree->node; if (!$this->isNodeHidden($node)) { - $childNode = $this->buildMenuItemFromSubtree($childSubtree); + $childNode = $this->buildMenuItemFromSubtree($childSubtree, $startLevel); $children[] = $childNode; } } @@ -226,7 +242,7 @@ protected function buildMenuItemFromSubtree(Subtree $subtree): MenuItem $node, $this->isCalculateItemStatesEnabled() ? $this->calculateItemState($node) : null, $node->getLabel(), - $subtree->level, + $subtree->level + $startLevel, $children, $this->buildUri($node) ); @@ -239,17 +255,14 @@ protected function buildMenuItemFromSubtree(Subtree $subtree): MenuItem * * If entryLevel is configured this will be taken into account as well. * - * @return Node|null + * @return NodeAggregateId|null * @throws FusionException */ - protected function findMenuStartingPoint(): ?Node + protected function findMenuStartingPointAggregateId(): ?NodeAggregateId { $fusionContext = $this->runtime->getCurrentContext(); $traversalStartingPoint = $this->getStartingPoint() ?: $fusionContext['node'] ?? null; - $contentRepositoryId = $this->currentNode->subgraphIdentity->contentRepositoryId; - $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId); - if (!$traversalStartingPoint instanceof Node) { throw new FusionException( 'You must either set a "startingPoint" for the menu or "node" must be set in the Fusion context.', @@ -258,59 +271,22 @@ protected function findMenuStartingPoint(): ?Node } if ($this->getEntryLevel() === 0) { - $entryParentNode = $traversalStartingPoint; + return $traversalStartingPoint->nodeAggregateId; } elseif ($this->getEntryLevel() < 0) { - $nodeTypeConstraintsWithSubNodeTypes = NodeTypeConstraintsWithSubNodeTypes::create( - $this->getNodeTypeConstraints(), - $contentRepository->getNodeTypeManager() - ); - $remainingIterations = abs($this->getEntryLevel()); - $entryParentNode = null; - $this->traverseUpUntilCondition( - $traversalStartingPoint, - function (Node $node) use ( - &$remainingIterations, - &$entryParentNode, - $nodeTypeConstraintsWithSubNodeTypes - ) { - if (!$nodeTypeConstraintsWithSubNodeTypes->matches($node->nodeTypeName)) { - return false; - } - - if ($remainingIterations > 0) { - $remainingIterations--; - - return true; - } else { - $entryParentNode = $node; - - return false; - } - } - ); + $ancestorNodeAggregateIds = $this->getCurrentNodeAncestorAggregateIds(); + if ($ancestorNodeAggregateIds === null) { + return null; + } + $ancestorNodeAggregateIdArray = array_values(iterator_to_array($ancestorNodeAggregateIds)); + return $ancestorNodeAggregateIdArray[$this->getEntryLevel() * -1 - 1] ?? null; } else { - $traversedHierarchy = []; - $nodeTypeConstraintsWithSubNodeTypes = NodeTypeConstraintsWithSubNodeTypes::create( - $this->getNodeTypeConstraints()->withAdditionalDisallowedNodeType( - NodeTypeNameFactory::forSites() - ), - $contentRepository->getNodeTypeManager() - ); - $this->traverseUpUntilCondition( - $traversalStartingPoint, - function (Node $traversedNode) use (&$traversedHierarchy, $nodeTypeConstraintsWithSubNodeTypes) { - if (!$nodeTypeConstraintsWithSubNodeTypes->matches($traversedNode->nodeTypeName)) { - return false; - } - $traversedHierarchy[] = $traversedNode; - return true; - } - ); - $traversedHierarchy = array_reverse($traversedHierarchy); - - $entryParentNode = $traversedHierarchy[$this->getEntryLevel() - 1] ?? null; + $ancestorNodeAggregateIds = $this->getCurrentNodeAncestorAggregateIds(); + if ($ancestorNodeAggregateIds === null) { + return null; + } + $ancestorNodeAggregateIdArray = array_reverse(array_values(iterator_to_array($ancestorNodeAggregateIds))); + return $ancestorNodeAggregateIdArray[$this->getEntryLevel() - 1] ?? null; } - return $entryParentNode; } protected function getNodeTypeConstraints(): NodeTypeConstraints @@ -318,24 +294,9 @@ protected function getNodeTypeConstraints(): NodeTypeConstraints if (!$this->nodeTypeConstraints) { $this->nodeTypeConstraints = NodeTypeConstraints::fromFilterString($this->getFilter()); } - return $this->nodeTypeConstraints; } - /** - * the callback always gets the current Node passed as first parameter, - * and then its parent, and its parent etc etc. - * Until it has reached the root, or the return value of the closure is FALSE. - */ - protected function traverseUpUntilCondition(Node $node, \Closure $callback): void - { - $subgraph = $this->contentRepositoryRegistry->subgraphForNode($node); - do { - $shouldContinueTraversal = $callback($node); - $node = $subgraph->findParentNode($node->nodeAggregateId); - } while ($shouldContinueTraversal !== false && $node !== null); - } - public function getCurrentNodeAncestorAggregateIds(): NodeAggregateIds { if ($this->currentNodeAncestorAggregateIds instanceof NodeAggregateIds) { @@ -345,9 +306,14 @@ public function getCurrentNodeAncestorAggregateIds(): NodeAggregateIds $currentNodeAncestors = $subgraph->findAncestorNodes( $this->currentNode->nodeAggregateId, FindAncestorNodesFilter::create( - $this->getNodeTypeConstraints() + NodeTypeConstraints::createWithAllowedNodeTypeNames( + NodeTypeNames::with( + NodeTypeNameFactory::forDocument() + ) + ) ) ); + $this->currentNodeAncestorAggregateIds = NodeAggregateIds::fromNodes($currentNodeAncestors); return $this->currentNodeAncestorAggregateIds; } diff --git a/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature b/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature index 8b120f6e36f..c1e5f225070 100644 --- a/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature +++ b/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature @@ -130,6 +130,22 @@ Feature: Tests for the "Neos.Neos:Menu" and related Fusion prototypes """ + Scenario: MenuItems (default on home page) + When I execute the following Fusion code: + """fusion + test = Neos.Neos:Test.Menu { + items = Neos.Neos:MenuItems + } + """ + And the Fusion context node is "a" + Then I expect the following Fusion rendering result: + """ + a1. (1) + a1a* (2) + a1b (2) + + """ + Scenario: MenuItems (maximumLevels = 3) When I execute the following Fusion code: """fusion @@ -150,23 +166,19 @@ Feature: Tests for the "Neos.Neos:Menu" and related Fusion prototypes """ -# NOTE: This scenario currently breaks because the actual output is empty -# Scenario: MenuItems (entryLevel = -5) -# When I execute the following Fusion code: -# """fusion -# test = Neos.Neos:Test.Menu { -# items = Neos.Neos:MenuItems { -# entryLevel = -5 -# } -# } -# """ -# Then I expect the following Fusion rendering result: -# """ -# a1. (1) -# a1a* (2) -# a1b (2) -# -# """ + Scenario: MenuItems (entryLevel = -5) + When I execute the following Fusion code: + """fusion + test = Neos.Neos:Test.Menu { + items = Neos.Neos:MenuItems { + entryLevel = -5 + } + } + """ + Then I expect the following Fusion rendering result: + """ + + """ Scenario: MenuItems (entryLevel = -1) @@ -235,21 +247,19 @@ Feature: Tests for the "Neos.Neos:Menu" and related Fusion prototypes """ -# NOTE: This scenario currently breaks because the actual output is "a1., a1a*, a1b" -# Scenario: MenuItems (lastLevel = -5) -# When I execute the following Fusion code: -# """fusion -# test = Neos.Neos:Test.Menu { -# items = Neos.Neos:MenuItems { -# lastLevel = -5 -# } -# } -# """ -# Then I expect the following Fusion rendering result: -# """ -# a1. (1) -# -# """ + Scenario: MenuItems (lastLevel = -5) + When I execute the following Fusion code: + """fusion + test = Neos.Neos:Test.Menu { + items = Neos.Neos:MenuItems { + lastLevel = -5 + } + } + """ + Then I expect the following Fusion rendering result: + """ + + """ Scenario: MenuItems (lastLevel = -1) When I execute the following Fusion code: @@ -285,21 +295,20 @@ Feature: Tests for the "Neos.Neos:Menu" and related Fusion prototypes """ -# NOTE: This scenario currently breaks because the actual output is "a1., a1a*, a1b" -# Scenario: MenuItems (lastLevel = 1) -# When I execute the following Fusion code: -# """fusion -# test = Neos.Neos:Test.Menu { -# items = Neos.Neos:MenuItems { -# lastLevel = 1 -# } -# } -# """ -# Then I expect the following Fusion rendering result: -# """ -# a1. (1) -# -# """ + Scenario: MenuItems (lastLevel = 1) + When I execute the following Fusion code: + """fusion + test = Neos.Neos:Test.Menu { + items = Neos.Neos:MenuItems { + lastLevel = 1 + } + } + """ + Then I expect the following Fusion rendering result: + """ + a1. (1) + + """ Scenario: MenuItems (filter non existing node type) When I execute the following Fusion code: @@ -314,22 +323,21 @@ Feature: Tests for the "Neos.Neos:Menu" and related Fusion prototypes """ """ -# NOTE: This scenario currently breaks because the actual output is empty -# Scenario: MenuItems (filter = DocumentType1) -# When I execute the following Fusion code: -# """fusion -# test = Neos.Neos:Test.Menu { -# items = Neos.Neos:MenuItems { -# filter = 'Neos.Neos:Test.DocumentType1' -# } -# } -# """ -# Then I expect the following Fusion rendering result: -# """ -# a1. (1) -# a1b (2) -# -# """ + Scenario: MenuItems (filter = DocumentType1) + When I execute the following Fusion code: + """fusion + test = Neos.Neos:Test.Menu { + items = Neos.Neos:MenuItems { + filter = 'Neos.Neos:Test.DocumentType1' + } + } + """ + Then I expect the following Fusion rendering result: + """ + a1. (1) + a1b (2) + + """ Scenario: MenuItems (filter = DocumentType2) When I execute the following Fusion code: @@ -376,22 +384,21 @@ Feature: Tests for the "Neos.Neos:Menu" and related Fusion prototypes """ """ -# NOTE: This scenario currently breaks because the actual output is "a., a1., a1a*, a1b" -# Scenario: MenuItems (itemCollection document nodes) -# When I execute the following Fusion code: -# """fusion -# test = Neos.Neos:Test.Menu { -# items = Neos.Neos:MenuItems { -# itemCollection = ${q(site).filter('[instanceof Neos.Neos:Document]').get()} -# } -# } -# """ -# Then I expect the following Fusion rendering result: -# """ -# a (1) -# a1. (2) -# -# """ + Scenario: MenuItems (itemCollection document nodes) + When I execute the following Fusion code: + """fusion + test = Neos.Neos:Test.Menu { + items = Neos.Neos:MenuItems { + itemCollection = ${q(site).filter('[instanceof Neos.Neos:Document]').get()} + } + } + """ + Then I expect the following Fusion rendering result: + """ + a. (1) + a1. (2) + + """ Scenario: MenuItems (startingPoint a1b1) When I execute the following Fusion code: From 74fba4d7f35cd0b90a5ed84d68d809bd446526ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Mu=CC=88ller?= <christian@flownative.com> Date: Wed, 1 Nov 2023 14:46:34 +0100 Subject: [PATCH 35/53] TASK: NodeController::show drop support for showInvisible This was a hidden feature in previous versions of Neos but was broken in various ways since years. First of all I think we prevented live workspace with show invisible in other parts of the code in the first place. There is also no route for this so you would have to know to use this as a GET argument. Could work apart from two further issues: The check for backend policy access won't work in any installation with the Flowpack.FrontendLogin package as that prevents backend roles on the frontend (show) route, this is the case eg. for the demo site. Even IF that is not the case and the conditions are successfully met, the showInvisible will work but the Fusion cache doesn't know about it, as cache identifiers currently do not contain visibility constraints, therefore this feature is dangerous as a visit from an authenticated user might store a cache entry with information that should not be visible to to the public. --- .../Classes/Controller/Frontend/NodeController.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Neos.Neos/Classes/Controller/Frontend/NodeController.php b/Neos.Neos/Classes/Controller/Frontend/NodeController.php index 8f8c450cef2..3dbbbd28b9b 100644 --- a/Neos.Neos/Classes/Controller/Frontend/NodeController.php +++ b/Neos.Neos/Classes/Controller/Frontend/NodeController.php @@ -198,7 +198,7 @@ public function previewAction(string $node): void * with unsafe requests from widgets or plugins that are rendered on the node * - For those the CSRF token is validated on the sub-request, so it is safe to be skipped here */ - public function showAction(string $node, bool $showInvisible = false): void + public function showAction(string $node): void { $siteDetectionResult = SiteDetectionResult::fromRequest($this->request->getHttpRequest()); $contentRepository = $this->contentRepositoryRegistry->get($siteDetectionResult->contentRepositoryId); @@ -208,15 +208,10 @@ public function showAction(string $node, bool $showInvisible = false): void throw new NodeNotFoundException('The requested node isn\'t accessible to the current user', 1430218623); } - $visibilityConstraints = VisibilityConstraints::frontend(); - if ($showInvisible && $this->privilegeManager->isPrivilegeTargetGranted('Neos.Neos:Backend.GeneralAccess')) { - $visibilityConstraints = VisibilityConstraints::withoutRestrictions(); - } - $subgraph = $contentRepository->getContentGraph()->getSubgraph( $nodeAddress->contentStreamId, $nodeAddress->dimensionSpacePoint, - $visibilityConstraints + VisibilityConstraints::frontend() ); $site = $this->nodeSiteResolvingService->findSiteNodeForNodeAddress( @@ -231,7 +226,7 @@ public function showAction(string $node, bool $showInvisible = false): void $nodeInstance = $subgraph->findNodeById($nodeAddress->nodeAggregateId); - if (is_null($nodeInstance)) { + if ($nodeInstance === null) { throw new NodeNotFoundException('The requested node does not exist', 1596191460); } From 7e2a09c286b8dc70d13b43fc1c3cb9421c85cbe5 Mon Sep 17 00:00:00 2001 From: Bernhard Schmitt <schmitt@sitegeist.de> Date: Wed, 1 Nov 2023 15:11:51 +0100 Subject: [PATCH 36/53] Sort siblings before reassigning positions --- .../DoctrineDbalContentGraphProjection.php | 12 +- .../Domain/Projection/Feature/NodeMove.php | 1 - .../MoveNodeAggregate.feature | 0 ...eringDisableStateWithoutDimensions.feature | 0 ...MoveNodeAggregateWithoutDimensions.feature | 0 ...NodeAggregate_NewParent_Dimensions.feature | 0 ...deAggregate_NoNewParent_Dimensions.feature | 282 +++++++++++------- 7 files changed, 188 insertions(+), 107 deletions(-) rename Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/{NodeMove => 08-NodeMove}/MoveNodeAggregate.feature (100%) rename Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/{NodeMove => 08-NodeMove}/MoveNodeAggregateConsideringDisableStateWithoutDimensions.feature (100%) rename Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/{NodeMove => 08-NodeMove}/MoveNodeAggregateWithoutDimensions.feature (100%) rename Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/{NodeMove => 08-NodeMove}/MoveNodeAggregate_NewParent_Dimensions.feature (100%) rename Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/{NodeMove => 08-NodeMove}/MoveNodeAggregate_NoNewParent_Dimensions.feature (64%) diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjection.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjection.php index 807679337c5..e44fd08d16e 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjection.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjection.php @@ -517,12 +517,6 @@ private function connectHierarchy( } /** - * @param NodeRelationAnchorPoint|null $parentAnchorPoint - * @param NodeRelationAnchorPoint|null $childAnchorPoint - * @param NodeRelationAnchorPoint|null $succeedingSiblingAnchorPoint - * @param ContentStreamId $contentStreamId - * @param DimensionSpacePoint $dimensionSpacePoint - * @return int * @throws \Doctrine\DBAL\DBALException */ private function getRelationPosition( @@ -590,6 +584,12 @@ private function getRelationPositionAfterRecalculation( $dimensionSpacePoint ); + usort( + $hierarchyRelations, + fn (HierarchyRelation $relationA, HierarchyRelation $relationB): int + => $relationA->position <=> $relationB->position + ); + foreach ($hierarchyRelations as $relation) { $offset += self::RELATION_DEFAULT_OFFSET; if ( diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeMove.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeMove.php index f2e032259f7..e32b01fb641 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeMove.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/NodeMove.php @@ -44,7 +44,6 @@ private function whenNodeAggregateWasMoved(NodeAggregateWasMoved $event): void $this->transactional(function () use ($event) { foreach ($event->nodeMoveMappings as $moveNodeMapping) { // for each materialized node in the DB which we want to adjust, we have one MoveNodeMapping. - /* @var \Neos\ContentRepository\Core\Feature\NodeMove\Dto\OriginNodeMoveMapping $moveNodeMapping */ $nodeToBeMoved = $this->getProjectionContentGraph()->findNodeByIds( $event->contentStreamId, $event->nodeAggregateId, diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/08-NodeMove/MoveNodeAggregate.feature similarity index 100% rename from Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate.feature rename to Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/08-NodeMove/MoveNodeAggregate.feature diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregateConsideringDisableStateWithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/08-NodeMove/MoveNodeAggregateConsideringDisableStateWithoutDimensions.feature similarity index 100% rename from Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregateConsideringDisableStateWithoutDimensions.feature rename to Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/08-NodeMove/MoveNodeAggregateConsideringDisableStateWithoutDimensions.feature diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregateWithoutDimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/08-NodeMove/MoveNodeAggregateWithoutDimensions.feature similarity index 100% rename from Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregateWithoutDimensions.feature rename to Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/08-NodeMove/MoveNodeAggregateWithoutDimensions.feature diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate_NewParent_Dimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/08-NodeMove/MoveNodeAggregate_NewParent_Dimensions.feature similarity index 100% rename from Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate_NewParent_Dimensions.feature rename to Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/08-NodeMove/MoveNodeAggregate_NewParent_Dimensions.feature diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate_NoNewParent_Dimensions.feature b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/08-NodeMove/MoveNodeAggregate_NoNewParent_Dimensions.feature similarity index 64% rename from Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate_NoNewParent_Dimensions.feature rename to Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/08-NodeMove/MoveNodeAggregate_NoNewParent_Dimensions.feature index c90dc25ff35..95e2549cd30 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/NodeMove/MoveNodeAggregate_NoNewParent_Dimensions.feature +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Features/08-NodeMove/MoveNodeAggregate_NoNewParent_Dimensions.feature @@ -19,85 +19,85 @@ Feature: Move a node with content dimensions And using identifier "default", I define a content repository And I am in content repository "default" And the command CreateRootWorkspace is executed with payload: - | Key | Value | - | workspaceName | "live" | - | workspaceTitle | "Live" | - | workspaceDescription | "The live workspace" | - | newContentStreamId | "cs-identifier" | + | Key | Value | + | workspaceName | "live" | + | workspaceTitle | "Live" | + | workspaceDescription | "The live workspace" | + | newContentStreamId | "cs-identifier" | And the graph projection is fully up to date And the command CreateRootNodeAggregateWithNode is executed with payload: - | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "lady-eleonode-rootford" | - | nodeTypeName | "Neos.ContentRepository:Root" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "lady-eleonode-rootford" | + | nodeTypeName | "Neos.ContentRepository:Root" | And the event NodeAggregateWithNodeWasCreated was published with payload: - | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "sir-david-nodenborough" | - | nodeTypeName | "Neos.ContentRepository.Testing:Document" | - | originDimensionSpacePoint | {"language": "mul"} | - | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateId | "lady-eleonode-rootford" | - | nodeName | "document" | - | nodeAggregateClassification | "regular" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-david-nodenborough" | + | nodeTypeName | "Neos.ContentRepository.Testing:Document" | + | originDimensionSpacePoint | {"language": "mul"} | + | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | + | parentNodeAggregateId | "lady-eleonode-rootford" | + | nodeName | "document" | + | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: - | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "anthony-destinode" | - | nodeTypeName | "Neos.ContentRepository.Testing:Document" | - | originDimensionSpacePoint | {"language": "mul"} | - | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateId | "sir-david-nodenborough" | - | nodeName | "child-document-a" | - | nodeAggregateClassification | "regular" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "anthony-destinode" | + | nodeTypeName | "Neos.ContentRepository.Testing:Document" | + | originDimensionSpacePoint | {"language": "mul"} | + | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | + | parentNodeAggregateId | "sir-david-nodenborough" | + | nodeName | "child-document-a" | + | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: - | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "berta-destinode" | - | nodeTypeName | "Neos.ContentRepository.Testing:Document" | - | originDimensionSpacePoint | {"language": "mul"} | - | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateId | "sir-david-nodenborough" | - | nodeName | "child-document-b" | - | nodeAggregateClassification | "regular" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "berta-destinode" | + | nodeTypeName | "Neos.ContentRepository.Testing:Document" | + | originDimensionSpacePoint | {"language": "mul"} | + | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | + | parentNodeAggregateId | "sir-david-nodenborough" | + | nodeName | "child-document-b" | + | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: - | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "nody-mc-nodeface" | - | nodeTypeName | "Neos.ContentRepository.Testing:Document" | - | originDimensionSpacePoint | {"language": "mul"} | - | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateId | "sir-david-nodenborough" | - | nodeName | "child-document-n" | - | nodeAggregateClassification | "regular" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | + | nodeTypeName | "Neos.ContentRepository.Testing:Document" | + | originDimensionSpacePoint | {"language": "mul"} | + | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | + | parentNodeAggregateId | "sir-david-nodenborough" | + | nodeName | "child-document-n" | + | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: - | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "carl-destinode" | - | nodeTypeName | "Neos.ContentRepository.Testing:Document" | - | originDimensionSpacePoint | {"language": "mul"} | - | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateId | "sir-david-nodenborough" | - | nodeName | "child-document-c" | - | nodeAggregateClassification | "regular" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "carl-destinode" | + | nodeTypeName | "Neos.ContentRepository.Testing:Document" | + | originDimensionSpacePoint | {"language": "mul"} | + | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | + | parentNodeAggregateId | "sir-david-nodenborough" | + | nodeName | "child-document-c" | + | nodeAggregateClassification | "regular" | And the event NodeAggregateWithNodeWasCreated was published with payload: - | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "sir-nodeward-nodington-iii" | - | nodeTypeName | "Neos.ContentRepository.Testing:Document" | - | originDimensionSpacePoint | {"language": "mul"} | - | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | - | parentNodeAggregateId | "lady-eleonode-rootford" | - | nodeName | "esquire" | - | nodeAggregateClassification | "regular" | + | Key | Value | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "sir-nodeward-nodington-iii" | + | nodeTypeName | "Neos.ContentRepository.Testing:Document" | + | originDimensionSpacePoint | {"language": "mul"} | + | coveredDimensionSpacePoints | [{"language": "mul"}, {"language": "de"}, {"language": "en"}, {"language": "gsw"}] | + | parentNodeAggregateId | "lady-eleonode-rootford" | + | nodeName | "esquire" | + | nodeAggregateClassification | "regular" | And the graph projection is fully up to date Scenario: Move a complete node aggregate before the first of its siblings When the command MoveNodeAggregate is executed with payload: - | Key | Value | + | Key | Value | | contentStreamId | "cs-identifier" | | nodeAggregateId | "nody-mc-nodeface" | - | dimensionSpacePoint | {"language": "mul"} | + | dimensionSpacePoint | {"language": "mul"} | | newParentNodeAggregateId | null | | newSucceedingSiblingNodeAggregateId | "anthony-destinode" | And the graph projection is fully up to date @@ -115,20 +115,20 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate before the first of its siblings - which does not exist in all variants Given the event NodeAggregateWasRemoved was published with payload: | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "anthony-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "anthony-destinode" | | affectedOccupiedDimensionSpacePoints | [] | | affectedCoveredDimensionSpacePoints | [{"language": "gsw"}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: - | Key | Value | + | Key | Value | | contentStreamId | "cs-identifier" | | nodeAggregateId | "nody-mc-nodeface" | - | dimensionSpacePoint | {"language": "mul"} | + | dimensionSpacePoint | {"language": "mul"} | | newParentNodeAggregateId | null | | newSucceedingSiblingNodeAggregateId | "anthony-destinode" | - | relationDistributionStrategy | "gatherAll" | + | relationDistributionStrategy | "gatherAll" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -152,10 +152,10 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate before another of its siblings When the command MoveNodeAggregate is executed with payload: - | Key | Value | + | Key | Value | | contentStreamId | "cs-identifier" | | nodeAggregateId | "nody-mc-nodeface" | - | dimensionSpacePoint | {"language": "mul"} | + | dimensionSpacePoint | {"language": "mul"} | | newParentNodeAggregateId | null | | newSucceedingSiblingNodeAggregateId | "berta-destinode" | And the graph projection is fully up to date @@ -174,17 +174,17 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate before another of its siblings - which does not exist in all variants Given the event NodeAggregateWasRemoved was published with payload: | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "berta-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "berta-destinode" | | affectedOccupiedDimensionSpacePoints | [] | | affectedCoveredDimensionSpacePoints | [{"language": "gsw"}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: - | Key | Value | + | Key | Value | | contentStreamId | "cs-identifier" | | nodeAggregateId | "nody-mc-nodeface" | - | dimensionSpacePoint | {"language": "mul"} | + | dimensionSpacePoint | {"language": "mul"} | | newParentNodeAggregateId | null | | newSucceedingSiblingNodeAggregateId | "berta-destinode" | And the graph projection is fully up to date @@ -213,17 +213,17 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate after another of its siblings - which does not exist in all variants Given the event NodeAggregateWasRemoved was published with payload: | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "carl-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "carl-destinode" | | affectedOccupiedDimensionSpacePoints | [] | | affectedCoveredDimensionSpacePoints | [{"language": "gsw"}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: - | Key | Value | + | Key | Value | | contentStreamId | "cs-identifier" | | nodeAggregateId | "nody-mc-nodeface" | - | dimensionSpacePoint | {"language": "mul"} | + | dimensionSpacePoint | {"language": "mul"} | | newParentNodeAggregateId | null | | newPrecedingSiblingNodeAggregateId | "berta-destinode" | And the graph projection is fully up to date @@ -251,17 +251,17 @@ Feature: Move a node with content dimensions Scenario: Move a complete node aggregate after the last of its siblings - with a predecessor which does not exist in all variants Given the event NodeAggregateWasRemoved was published with payload: | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "carl-destinode" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "carl-destinode" | | affectedOccupiedDimensionSpacePoints | [] | | affectedCoveredDimensionSpacePoints | [{"language": "gsw"}] | And the graph projection is fully up to date When the command MoveNodeAggregate is executed with payload: - | Key | Value | + | Key | Value | | contentStreamId | "cs-identifier" | | nodeAggregateId | "nody-mc-nodeface" | - | dimensionSpacePoint | {"language": "mul"} | + | dimensionSpacePoint | {"language": "mul"} | | newParentNodeAggregateId | null | | newSucceedingSiblingNodeAggregateId | null | And the graph projection is fully up to date @@ -287,12 +287,12 @@ Feature: Move a node with content dimensions Scenario: Move a single node before the first of its siblings When the command MoveNodeAggregate is executed with payload: - | Key | Value | + | Key | Value | | contentStreamId | "cs-identifier" | | nodeAggregateId | "nody-mc-nodeface" | - | dimensionSpacePoint | {"language": "mul"} | + | dimensionSpacePoint | {"language": "mul"} | | newSucceedingSiblingNodeAggregateId | "anthony-destinode" | - | relationDistributionStrategy | "scatter" | + | relationDistributionStrategy | "scatter" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -318,12 +318,12 @@ Feature: Move a node with content dimensions Scenario: Move a single node between two of its siblings When the command MoveNodeAggregate is executed with payload: - | Key | Value | + | Key | Value | | contentStreamId | "cs-identifier" | | nodeAggregateId | "nody-mc-nodeface" | - | dimensionSpacePoint | {"language": "mul"} | + | dimensionSpacePoint | {"language": "mul"} | | newSucceedingSiblingNodeAggregateId | "berta-destinode" | - | relationDistributionStrategy | "scatter" | + | relationDistributionStrategy | "scatter" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -351,8 +351,8 @@ Feature: Move a node with content dimensions Scenario: Move a single node to the end of its siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "mul"} | | relationDistributionStrategy | "scatter" | And the graph projection is fully up to date @@ -380,12 +380,12 @@ Feature: Move a node with content dimensions Scenario: Move a node and its specializations before the first of its siblings When the command MoveNodeAggregate is executed with payload: - | Key | Value | + | Key | Value | | contentStreamId | "cs-identifier" | | nodeAggregateId | "nody-mc-nodeface" | - | dimensionSpacePoint | {"language": "de"} | + | dimensionSpacePoint | {"language": "de"} | | newSucceedingSiblingNodeAggregateId | "anthony-destinode" | - | relationDistributionStrategy | "gatherSpecializations" | + | relationDistributionStrategy | "gatherSpecializations" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -421,12 +421,12 @@ Feature: Move a node with content dimensions Scenario: Move a node and its specializations between two of its siblings When the command MoveNodeAggregate is executed with payload: - | Key | Value | + | Key | Value | | contentStreamId | "cs-identifier" | | nodeAggregateId | "nody-mc-nodeface" | - | dimensionSpacePoint | {"language": "de"} | + | dimensionSpacePoint | {"language": "de"} | | newSucceedingSiblingNodeAggregateId | "berta-destinode" | - | relationDistributionStrategy | "gatherSpecializations" | + | relationDistributionStrategy | "gatherSpecializations" | And the graph projection is fully up to date When I am in content stream "cs-identifier" and dimension space point {"language": "mul"} @@ -465,8 +465,8 @@ Feature: Move a node with content dimensions Scenario: Move a node and its specializations to the end of its siblings When the command MoveNodeAggregate is executed with payload: | Key | Value | - | contentStreamId | "cs-identifier" | - | nodeAggregateId | "nody-mc-nodeface" | + | contentStreamId | "cs-identifier" | + | nodeAggregateId | "nody-mc-nodeface" | | dimensionSpacePoint | {"language": "de"} | | relationDistributionStrategy | "gatherSpecializations" | And the graph projection is fully up to date @@ -501,3 +501,85 @@ Feature: Move a node with content dimensions | cs-identifier;berta-destinode;{"language": "mul"} | | cs-identifier;anthony-destinode;{"language": "mul"} | And I expect this node to have no succeeding siblings + + Scenario: Trigger position update in DBAL graph + Given I am in content stream "cs-identifier" and dimension space point {"language": "mul"} + # distance i to x: 128 + Given the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | + | lady-nodette-nodington-i | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | nodington-i | + | lady-nodette-nodington-x | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | nodington-x | + | lady-nodette-nodington-ix | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | nodington-ix | + | lady-nodette-nodington-viii | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | nodington-viii | + | lady-nodette-nodington-vii | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | nodington-vii | + | lady-nodette-nodington-vi | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | nodington-vi | + | lady-nodette-nodington-v | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | nodington-v | + | lady-nodette-nodington-iv | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | nodington-iv | + | lady-nodette-nodington-iii | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | nodington-iii | + | lady-nodette-nodington-ii | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | nodington-ii | + # distance ii to x: 64 + When the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "lady-nodette-nodington-ii" | + | newSucceedingSiblingNodeAggregateId | "lady-nodette-nodington-x" | + And the graph projection is fully up to date + # distance iii to x: 32 + And the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "lady-nodette-nodington-iii" | + | newSucceedingSiblingNodeAggregateId | "lady-nodette-nodington-x" | + And the graph projection is fully up to date + # distance iv to x: 16 + And the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "lady-nodette-nodington-iv" | + | newSucceedingSiblingNodeAggregateId | "lady-nodette-nodington-x" | + And the graph projection is fully up to date + # distance v to x: 8 + And the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "lady-nodette-nodington-v" | + | newSucceedingSiblingNodeAggregateId | "lady-nodette-nodington-x" | + And the graph projection is fully up to date + # distance vi to x: 4 + And the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "lady-nodette-nodington-vi" | + | newSucceedingSiblingNodeAggregateId | "lady-nodette-nodington-x" | + And the graph projection is fully up to date + # distance vii to x: 2 + And the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "lady-nodette-nodington-vii" | + | newSucceedingSiblingNodeAggregateId | "lady-nodette-nodington-x" | + And the graph projection is fully up to date + # distance viii to x: 1 -> reorder -> 128 + And the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "lady-nodette-nodington-viii" | + | newSucceedingSiblingNodeAggregateId | "lady-nodette-nodington-x" | + And the graph projection is fully up to date + # distance ix to x: 64 after reorder + And the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "lady-nodette-nodington-ix" | + | newSucceedingSiblingNodeAggregateId | "lady-nodette-nodington-x" | + And the graph projection is fully up to date + + Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{} + And I expect this node to have the following child nodes: + | Name | NodeDiscriminator | + | document | cs-identifier;sir-david-nodenborough;{"language": "mul"} | + | esquire | cs-identifier;sir-nodeward-nodington-iii;{"language": "mul"} | + | nodington-i | cs-identifier;lady-nodette-nodington-i;{"language": "mul"} | + | nodington-ii | cs-identifier;lady-nodette-nodington-ii;{"language": "mul"} | + | nodington-iii | cs-identifier;lady-nodette-nodington-iii;{"language": "mul"} | + | nodington-iv | cs-identifier;lady-nodette-nodington-iv;{"language": "mul"} | + | nodington-v | cs-identifier;lady-nodette-nodington-v;{"language": "mul"} | + | nodington-vi | cs-identifier;lady-nodette-nodington-vi;{"language": "mul"} | + | nodington-vii | cs-identifier;lady-nodette-nodington-vii;{"language": "mul"} | + | nodington-viii | cs-identifier;lady-nodette-nodington-viii;{"language": "mul"} | + | nodington-ix | cs-identifier;lady-nodette-nodington-ix;{"language": "mul"} | + | nodington-x | cs-identifier;lady-nodette-nodington-x;{"language": "mul"} | + + From 6512d5d342e40596e1412899ef0fa634e7bacad7 Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns <karsten@dambekalns.de> Date: Wed, 1 Nov 2023 15:36:05 +0100 Subject: [PATCH 37/53] TASK: Update Media documenttation conf.py [skip ci] --- Neos.Media/Documentation/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Neos.Media/Documentation/conf.py b/Neos.Media/Documentation/conf.py index 6fdf4edc962..9809cc0e42e 100644 --- a/Neos.Media/Documentation/conf.py +++ b/Neos.Media/Documentation/conf.py @@ -27,9 +27,9 @@ author = 'Neos Team and Contributors' # The short X.Y version. -version = 'dev-master' +version = '8.3' # The full version, including alpha/beta/rc tags. -release = 'dev-master' +release = '8.3.x' # -- General configuration --------------------------------------------------- From 0e4e210e14b6e83ec03a03d5ca8ce10b75f86c10 Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns <karsten@dambekalns.de> Date: Wed, 1 Nov 2023 15:36:45 +0100 Subject: [PATCH 38/53] TASK: Update Media documenttation conf.py [skip ci] --- Neos.Media/Documentation/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Neos.Media/Documentation/conf.py b/Neos.Media/Documentation/conf.py index 6fdf4edc962..6cff3a86200 100644 --- a/Neos.Media/Documentation/conf.py +++ b/Neos.Media/Documentation/conf.py @@ -27,9 +27,9 @@ author = 'Neos Team and Contributors' # The short X.Y version. -version = 'dev-master' +version = '9.0' # The full version, including alpha/beta/rc tags. -release = 'dev-master' +release = '9.0.x' # -- General configuration --------------------------------------------------- From 58f5ec12241b7a8e7ebef3099ad566550a73938d Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns <karsten@dambekalns.de> Date: Wed, 1 Nov 2023 15:37:20 +0100 Subject: [PATCH 39/53] TASK: Update Media documentation conf.py [skip ci] --- Neos.Media/Documentation/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Neos.Media/Documentation/conf.py b/Neos.Media/Documentation/conf.py index 6fdf4edc962..d7a2aa4ecbd 100644 --- a/Neos.Media/Documentation/conf.py +++ b/Neos.Media/Documentation/conf.py @@ -27,9 +27,9 @@ author = 'Neos Team and Contributors' # The short X.Y version. -version = 'dev-master' +version = '8.2' # The full version, including alpha/beta/rc tags. -release = 'dev-master' +release = '8.2.x' # -- General configuration --------------------------------------------------- From 7f1fb5ed56fc2c6d99a074181eeb5a7b30c6a4da Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns <karsten@dambekalns.de> Date: Wed, 1 Nov 2023 15:37:42 +0100 Subject: [PATCH 40/53] TASK: Update Media documentation conf.py [skip ci] --- Neos.Media/Documentation/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Neos.Media/Documentation/conf.py b/Neos.Media/Documentation/conf.py index 6fdf4edc962..b614a81b376 100644 --- a/Neos.Media/Documentation/conf.py +++ b/Neos.Media/Documentation/conf.py @@ -27,9 +27,9 @@ author = 'Neos Team and Contributors' # The short X.Y version. -version = 'dev-master' +version = '8.1' # The full version, including alpha/beta/rc tags. -release = 'dev-master' +release = '8.1.x' # -- General configuration --------------------------------------------------- From 1a0d8d561f22f3f4ef7b02664fdffdf4d699afab Mon Sep 17 00:00:00 2001 From: Jenkins <jenkins@neos.io> Date: Wed, 1 Nov 2023 14:38:04 +0000 Subject: [PATCH 41/53] TASK: Update references [skip ci] --- Neos.Neos/Documentation/References/CommandReference.rst | 2 +- Neos.Neos/Documentation/References/EelHelpersReference.rst | 2 +- .../Documentation/References/FlowQueryOperationReference.rst | 2 +- .../Documentation/References/Signals/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/Signals/Flow.rst | 2 +- Neos.Neos/Documentation/References/Signals/Media.rst | 2 +- Neos.Neos/Documentation/References/Signals/Neos.rst | 2 +- Neos.Neos/Documentation/References/Validators/Flow.rst | 2 +- Neos.Neos/Documentation/References/Validators/Media.rst | 2 +- Neos.Neos/Documentation/References/Validators/Party.rst | 2 +- .../Documentation/References/ViewHelpers/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Form.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Media.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Neos.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Neos.Neos/Documentation/References/CommandReference.rst b/Neos.Neos/Documentation/References/CommandReference.rst index 9d6d214ff65..5e486ba7350 100644 --- a/Neos.Neos/Documentation/References/CommandReference.rst +++ b/Neos.Neos/Documentation/References/CommandReference.rst @@ -19,7 +19,7 @@ commands that may be available, use:: ./flow help -The following reference was automatically generated from code on 2023-10-31 +The following reference was automatically generated from code on 2023-11-01 .. _`Neos Command Reference: NEOS.CONTENTREPOSITORY`: diff --git a/Neos.Neos/Documentation/References/EelHelpersReference.rst b/Neos.Neos/Documentation/References/EelHelpersReference.rst index ee20f863532..e285d1c8ccc 100644 --- a/Neos.Neos/Documentation/References/EelHelpersReference.rst +++ b/Neos.Neos/Documentation/References/EelHelpersReference.rst @@ -3,7 +3,7 @@ Eel Helpers Reference ===================== -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Eel Helpers Reference: Api`: diff --git a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst index 7f5ed6f9a4b..313561e3f2d 100644 --- a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst +++ b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst @@ -3,7 +3,7 @@ FlowQuery Operation Reference ============================= -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`FlowQuery Operation Reference: add`: diff --git a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst index 255c6d56d7d..62af6be6d29 100644 --- a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository Signals Reference ==================================== -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Content Repository Signals Reference: Context (``Neos\ContentRepository\Domain\Service\Context``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Flow.rst b/Neos.Neos/Documentation/References/Signals/Flow.rst index 84d6aefe223..b0c21600b1c 100644 --- a/Neos.Neos/Documentation/References/Signals/Flow.rst +++ b/Neos.Neos/Documentation/References/Signals/Flow.rst @@ -3,7 +3,7 @@ Flow Signals Reference ====================== -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Flow Signals Reference: AbstractAdvice (``Neos\Flow\Aop\Advice\AbstractAdvice``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Media.rst b/Neos.Neos/Documentation/References/Signals/Media.rst index 2bff5dd6769..c85d2749301 100644 --- a/Neos.Neos/Documentation/References/Signals/Media.rst +++ b/Neos.Neos/Documentation/References/Signals/Media.rst @@ -3,7 +3,7 @@ Media Signals Reference ======================= -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Media Signals Reference: AssetCollectionController (``Neos\Media\Browser\Controller\AssetCollectionController``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Neos.rst b/Neos.Neos/Documentation/References/Signals/Neos.rst index c1db8296650..2ebf0272945 100644 --- a/Neos.Neos/Documentation/References/Signals/Neos.rst +++ b/Neos.Neos/Documentation/References/Signals/Neos.rst @@ -3,7 +3,7 @@ Neos Signals Reference ====================== -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Neos Signals Reference: AbstractCreate (``Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate``)`: diff --git a/Neos.Neos/Documentation/References/Validators/Flow.rst b/Neos.Neos/Documentation/References/Validators/Flow.rst index 72e74a32150..9a355dbd25f 100644 --- a/Neos.Neos/Documentation/References/Validators/Flow.rst +++ b/Neos.Neos/Documentation/References/Validators/Flow.rst @@ -3,7 +3,7 @@ Flow Validator Reference ======================== -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Flow Validator Reference: AggregateBoundaryValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Media.rst b/Neos.Neos/Documentation/References/Validators/Media.rst index 1bf3dda1b50..4ab02a7bfcf 100644 --- a/Neos.Neos/Documentation/References/Validators/Media.rst +++ b/Neos.Neos/Documentation/References/Validators/Media.rst @@ -3,7 +3,7 @@ Media Validator Reference ========================= -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Media Validator Reference: ImageOrientationValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Party.rst b/Neos.Neos/Documentation/References/Validators/Party.rst index 24d7154e1a5..4a838dacc18 100644 --- a/Neos.Neos/Documentation/References/Validators/Party.rst +++ b/Neos.Neos/Documentation/References/Validators/Party.rst @@ -3,7 +3,7 @@ Party Validator Reference ========================= -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Party Validator Reference: AimAddressValidator`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst index bf3133ca179..096af561261 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository ViewHelper Reference ####################################### -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Content Repository ViewHelper Reference: PaginateViewHelper`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst index 549616fb937..8fd558f5957 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst @@ -3,7 +3,7 @@ FluidAdaptor ViewHelper Reference ################################# -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`FluidAdaptor ViewHelper Reference: f:debug`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst index 7ce0a458e3e..31197ac31f0 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst @@ -3,7 +3,7 @@ Form ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Form ViewHelper Reference: neos.form:form`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst index 8a151aeb8f2..9879c19d84d 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst @@ -3,7 +3,7 @@ Fusion ViewHelper Reference ########################### -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Fusion ViewHelper Reference: fusion:render`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst index 41ef5999832..895e7e0a245 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst @@ -3,7 +3,7 @@ Media ViewHelper Reference ########################## -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Media ViewHelper Reference: neos.media:fileTypeIcon`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst index 4d92f614eb4..a82cac259fe 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst @@ -3,7 +3,7 @@ Neos ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`Neos ViewHelper Reference: neos:backend.authenticationProviderLabel`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst index 0fad77472a3..adfa88e2413 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst @@ -3,7 +3,7 @@ TYPO3 Fluid ViewHelper Reference ################################ -This reference was automatically generated from code on 2023-10-31 +This reference was automatically generated from code on 2023-11-01 .. _`TYPO3 Fluid ViewHelper Reference: f:alias`: From c5f5a5f1bc9b34566f7fd85c2104b83a29babb7d Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns <karsten@dambekalns.de> Date: Wed, 1 Nov 2023 15:38:12 +0100 Subject: [PATCH 42/53] TASK: Update Media documentation conf.py [skip ci] --- Neos.Media/Documentation/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Neos.Media/Documentation/conf.py b/Neos.Media/Documentation/conf.py index 6fdf4edc962..a6181951420 100644 --- a/Neos.Media/Documentation/conf.py +++ b/Neos.Media/Documentation/conf.py @@ -27,9 +27,9 @@ author = 'Neos Team and Contributors' # The short X.Y version. -version = 'dev-master' +version = '8.0' # The full version, including alpha/beta/rc tags. -release = 'dev-master' +release = '8.0.x' # -- General configuration --------------------------------------------------- From 70465f7d430c3c259c335c02c2b0443969da262d Mon Sep 17 00:00:00 2001 From: Martin Ficzel <ficzel@sitegeist.de> Date: Wed, 1 Nov 2023 12:19:07 +0100 Subject: [PATCH 43/53] TASK: De-entangle the menuitems implementations and pass props explicitly from *Menu prototype to *MenuItems prototypes. --- .../Fusion/MenuItemsImplementation.php | 2 +- .../References/NeosFusionReference.rst | 49 ++++++++++++++----- .../Fusion/Prototypes/BreadcrumbMenu.fusion | 9 +++- .../Prototypes/BreadcrumbMenuItems.fusion | 5 ++ .../Fusion/Prototypes/DimensionsMenu.fusion | 24 ++++++++- .../Prototypes/DimensionsMenuItems.fusion | 21 +++++--- .../Private/Fusion/Prototypes/Menu.fusion | 40 ++++++++++++++- .../Fusion/Prototypes/MenuItems.fusion | 21 +++++++- 8 files changed, 145 insertions(+), 26 deletions(-) diff --git a/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php index c8f67bace29..79d5b34feb1 100644 --- a/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php @@ -176,7 +176,7 @@ protected function buildItems(): array $maximumLevels = $this->getMaximumLevels(); $lastLevels = $this->getLastLevel(); - if ($lastLevels !== 0) { + if ($lastLevels !== null) { $depthOfEntryParentNodeAggregateId = $subgraph->countAncestorNodes( $entryParentNodeAggregateId, CountAncestorNodesFilter::create( diff --git a/Neos.Neos/Documentation/References/NeosFusionReference.rst b/Neos.Neos/Documentation/References/NeosFusionReference.rst index 2f4aad1520e..5be4c9270f1 100644 --- a/Neos.Neos/Documentation/References/NeosFusionReference.rst +++ b/Neos.Neos/Documentation/References/NeosFusionReference.rst @@ -969,7 +969,18 @@ Neos.Neos:Menu Render a menu with items for nodes. :attributes: (:ref:`Neos_Fusion__DataStructure`) attributes for the whole menu -:[key]: (mixed) all other fusion properties are passed over to :ref:`Neos_Neos__MenuItems` internally to calculate the `items` + +The following properties are passed over to :ref:`Neos_Neos__MenuItems` internally: + +:node: (Node) The current node used to calculate the itemStates, and ``startingPoint`` (if not defined explicitly). Defaults to ``node`` from the fusion context +:entryLevel: (integer) Define the startingPoint of the menu relatively. Non negative values specify this as n levels below root. Negative values are n steps up from ``node`` or ``startingPoint`` if defined. Defaults to ``1`` if no ``startingPoint`` is set otherwise ``0`` +:lastLevel: (optional, integer) Restrict the depth of the menu relatively. Positive values specify this as n levels below root. Negative values specify this as n steps up from ``node``. Defaults to ``null`` +:maximumLevels: (integer) Restrict the maximum depth of items in the menu (relative to ``entryLevel``) +:startingPoint: (optional, Node) The node where the menu hierarchy starts. If not specified explicitly the startingPoint is calculated from (``node`` and ``entryLevel``), defaults to ``null`` +:filter: (string) Filter items by node type (e.g. ``'!My.Site:News,Neos.Neos:Document'``), defaults to ``'Neos.Neos:Document'``. The filter is only used for fetching subItems and is ignored for determining the ``startingPoint`` +:renderHiddenInIndex: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered, defaults to ``false`` +:calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false``. +:itemCollection: (optional, array of Nodes) Explicitly set the Node items for the menu (taking precedence over ``startingPoints`` and ``entryLevel`` and ``lastLevel``). The children for each ``Node`` will be fetched taking the ``maximumLevels`` property into account. Example:: @@ -991,8 +1002,13 @@ Neos.Neos:BreadcrumbMenu Render a breadcrumb (ancestor documents). -:attributes: (:ref:`Neos_Fusion__DataStructure`) attributes for the whole menu -:[key]: (mixed) all other fusion properties are passed over to :ref:`Neos_Neos__BreadcrumbMenuItems` internally +:attributes: (:ref:`Neos_Fusion__DataStructure`) html attributes for the rendered list + +The following properties are passed over to :ref:`Neos_Neos__BreadcrumbMenuItems` internally: + +:maximumLevels: (integer) Restrict the maximum depth of items in the menu, defaults to ``0`` +:renderHiddenInIndex: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to ``false``. +:calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` Example:: @@ -1013,7 +1029,14 @@ Neos.Neos:DimensionsMenu Create links to other node variants (e.g. variants of the current node in other dimensions). :attributes: (:ref:`Neos_Fusion__DataStructure`) attributes for the whole menu -:[key]: (mixed) all other fusion properties are passed over to :ref:`Neos_Neos__DimensionsMenuItems` internally + +The following fusion properties are passed over to :ref:`Neos_Neos__DimensionsMenuItems` internally: + +:dimension: (optional, string): name of the dimension which this menu should be based on. Example: "language". +:presets: (optional, array): If set, the presets rendered will be taken from this list of preset identifiers +:includeAllPresets: (boolean, default **false**) If TRUE, include all presets, not only allowed combinations +:renderHiddenInIndex: (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-index" +:calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` .. note:: The ``items`` of the ``DimensionsMenu`` are internally calculated with the prototype :ref:`Neos_Neos__DimensionsMenuMenuItems` which you can use directly aswell. @@ -1037,15 +1060,17 @@ Neos.Neos:MenuItems Create a list of menu-items items for nodes. -:entryLevel: (integer) Start the menu at the given depth +:node: (Node) The current node used to calculate the itemStates, and ``startingPoint`` (if not defined explicitly). Defaults to ``node`` from the fusion context +:entryLevel: (integer) Define the startingPoint of the menu relatively. Non negative values specify this as n levels below root. Negative values are n steps up from ``node`` or ``startingPoint`` if defined. Defaults to ``1`` if no ``startingPoint`` is set otherwise ``0`` +:lastLevel: (optional, integer) Restrict the depth of the menu relatively. Positive values specify this as n levels below root. Negative values specify this as n steps up from ``node``. Defaults to ``null`` :maximumLevels: (integer) Restrict the maximum depth of items in the menu (relative to ``entryLevel``) -:startingPoint: (Node) The parent node of the first menu level (defaults to ``node`` context variable) -:lastLevel: (integer) Restrict the menu depth by node depth (relative to site node) -:filter: (string) Filter items by node type (e.g. ``'!My.Site:News,Neos.Neos:Document'``), defaults to ``'Neos.Neos:Document'`` +:startingPoint: (optional, Node) The node where the menu hierarchy starts. If not specified explicitly the startingPoint is calculated from (``node`` and ``entryLevel``), defaults to ``null`` +:filter: (string) Filter items by node type (e.g. ``'!My.Site:News,Neos.Neos:Document'``), defaults to ``'Neos.Neos:Document'``. The filter is only used for fetching subItems and is ignored for determining the ``startingPoint`` :renderHiddenInIndex: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered, defaults to ``false`` -:itemCollection: (array) Explicitly set the Node items for the menu (alternative to ``startingPoints`` and levels) -:itemUriRenderer: (:ref:`Neos_Neos__NodeUri`) prototype to use for rendering the URI of each item -:calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` +:calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false``. +:itemCollection: (optional, array of Nodes) Explicitly set the Node items for the menu (taking precedence over ``startingPoints`` and ``entryLevel`` and ``lastLevel``). The children for each ``Node`` will be fetched taking the ``maximumLevels`` property into account. + +Note:: MenuItems item properties: ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1056,6 +1081,7 @@ MenuItems item properties: :label: (string) Full label of the node :menuLevel: (integer) Menu level the item is rendered on :uri: (string) Frontend URI of the node +:children: (array) array of ``MenuItem`` instances Examples: ^^^^^^^^^ @@ -1130,7 +1156,6 @@ If no node variant exists for the preset combination, a ``NULL`` node will be in :presets: (optional, array): If set, the presets rendered will be taken from this list of preset identifiers :includeAllPresets: (boolean, default **false**) If TRUE, include all presets, not only allowed combinations :renderHiddenInIndex: (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-index" -:itemUriRenderer: (:ref:`Neos_Neos__NodeUri`) prototype to use for rendering the URI of each item :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` Each ``item`` has the following properties: diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion index a93e64eccae..849b72eb293 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion @@ -1,9 +1,16 @@ # Neos.Neos:BreadcrumbMenu provides a breadcrumb navigation based on menu items. # prototype(Neos.Neos:BreadcrumbMenu) < prototype(Neos.Fusion:Component) { + # html attributes for the rendered list attributes = Neos.Fusion:DataStructure + + # (integer) Restrict the maximum depth of items in the menu, defaults to ``0`` maximumLevels = 0 - renderHiddenInIndex = false + + # (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to ``false``. + renderHiddenInIndex = true + + # (boolean) activate the *expensive* calculation of item states defaults to ``false`` calculateItemStates = false @private { diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion index 3a38f547737..eb9325251c2 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion @@ -1,6 +1,11 @@ prototype(Neos.Neos:BreadcrumbMenuItems) < prototype(Neos.Fusion:Component) { + # (integer) Restrict the maximum depth of items in the menu, defaults to ``0`` maximumLevels = 0 + + # (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to ``false``. renderHiddenInIndex = true + + # (boolean) activate the *expensive* calculation of item states defaults to ``false`` calculateItemStates = false renderer = Neos.Fusion:Value { diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion index fccffdb3e06..2f9e13ee42c 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion @@ -1,11 +1,31 @@ # Neos.Neos:DimensionsMenu provides dimension (e.g. language) menu rendering prototype(Neos.Neos:DimensionsMenu) < prototype(Neos.Fusion:Component) { + # html attributes for the rendered list attributes = Neos.Fusion:DataStructure + # (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-index" + renderHiddenInIndex = true + + # (optional, string): name of the dimension which this menu should be based on. Example: "language". + dimension = null + + # (optional, array): If set, the presets rendered will be taken from this list of preset identifiers + presets = null + + # (boolean, default **false**) If TRUE, include all presets, not only allowed combinations + includeAllPresets = false + + # (boolean) activate the *expensive* calculation of item states defaults to ``false`` + calculateItemStates = false + + @private { items = Neos.Neos:DimensionsMenuItems { - @ignoreProperties = ${['attributes']} - @apply.props = ${props} + renderHiddenInIndex = ${props.renderHiddenInIndex} + dimension = ${props.dimension} + presets = ${props.presets} + includeAllPresets = ${props.includeAllPresets} + calculateItemStates = ${props.calculateItemStates} } } diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion index 21578fad44d..783a193e9b3 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion @@ -1,15 +1,24 @@ -prototype(Neos.Neos:DimensionsMenuItems) < prototype(Neos.Neos:MenuItems) { - @class = 'Neos\\Neos\\Fusion\\DimensionsMenuItemsImplementation' +prototype(Neos.Neos:DimensionsMenuItems) { + @class = 'Neos\\Neos\\Fusion\\DimensionsMenuItemsImplementation' - # if documents which are hidden in index should be rendered or not + # (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-index" renderHiddenInIndex = true - # name of the dimension to use (optional) + # (optional, string): name of the dimension which this menu should be based on. Example: "language". dimension = null - # list of presets, if the default order should be overridden, only used with "dimension" set + # (optional, array): If set, the presets rendered will be taken from this list of preset identifiers presets = null - # if true, items for all presets will be included, ignoring dimension constraints + # (boolean, default **false**) If TRUE, include all presets, not only allowed combinations includeAllPresets = false + + # (boolean) activate the *expensive* calculation of item states defaults to ``false`` + calculateItemStates = false + + // This property is used internally by `MenuItemsImplementation` to render each items uri. + // It can be modified to change behaviour for all rendered uris. + itemUriRenderer = Neos.Neos:NodeUri { + node = ${itemNode} + } } diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion index aca16e43107..a2e4eef00ab 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion @@ -1,12 +1,48 @@ # Neos.Neos:Menu provides basic menu rendering # prototype(Neos.Neos:Menu) < prototype(Neos.Fusion:Component) { + # html attributes for the rendered list attributes = Neos.Fusion:DataStructure + # (Node) The current node used to calculate the itemStates, and ``startingPoint`` (if not defined explicitly). Defaults to ``node`` from the fusion context + node = ${node} + + # (integer) Define the startingPoint of the menu relatively. Non negative values specify this as n levels below root. Negative values are n steps up from ``node`` or ``startingPoint`` if defined. Defaults to ``1`` if no ``startingPoint`` is set otherwise ``0`` + entryLevel = ${this.startingPoint ? 0 : 1} + + # (optional, integer) Restrict the depth of the menu relatively. Positive values specify this as n levels below root. Negative values specify this as n steps up from ``node``. Defaults to ``null`` + lastLevel = null + + # (integer) Restrict the maximum depth of items in the menu (relative to ``entryLevel``) + maximumLevels = 2 + + # (optional, Node) The node where the menu hierarchy starts. If not specified explicitly the startingPoint is calculated from (``node`` and ``entryLevel``), defaults to ``null`` + startingPoint = null + + # (string) Filter items by node type (e.g. ``'!My.Site:News,Neos.Neos:Document'``), defaults to ``'Neos.Neos:Document'``. The filter is only used for fetching subItems and is ignored for determining the ``startingPoint`` + filter = 'Neos.Neos:Document' + + # (boolean) Whether nodes with ``hiddenInIndex`` should be rendered, defaults to ``false`` + renderHiddenInIndex = false + + # (boolean) activate the *expensive* calculation of item states defaults to ``false``. + calculateItemStates = false + + # (optional, array of Nodes) Explicitly set the Node items for the menu (taking precedence over ``startingPoints`` and ``entryLevel`` and ``lastLevel``). The children for each ``Node`` will be fetched taking the ``maximumLevels`` property into account. + itemCollection = null + + @private { items = Neos.Neos:MenuItems { - @ignoreProperties = ${['attributes']} - @apply.props = ${props} + node = ${props.node} + entryLevel = ${props.entryLevel} + lastLevel = ${props.lastLevel} + maximumLevels = ${props.maximumLevels} + startingPoint = ${props.startingPoint} + filter = ${props.filter} + renderHiddenInIndex = ${props.renderHiddenInIndex} + calculateItemStates = ${props.calculateItemStates} + itemCollection = ${props.itemCollection} } } diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion index d2ef5d4b7f1..2ee88194383 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion @@ -1,16 +1,33 @@ prototype(Neos.Neos:MenuItems) { @class = 'Neos\\Neos\\Fusion\\MenuItemsImplementation' + # (Node) The current node used to calculate the itemStates, and ``startingPoint`` (if not defined explicitly). Defaults to ``node`` from the fusion context node = ${node} + + # (integer) Define the startingPoint of the menu relatively. Non negative values specify this as n levels below root. Negative values are n steps up from ``node`` or ``startingPoint`` if defined. Defaults to ``1`` if no ``startingPoint`` is set otherwise ``0`` entryLevel = ${this.startingPoint ? 0 : 1} + + # (optional, integer) Restrict the depth of the menu relatively. Positive values specify this as n levels below root. Negative values specify this as n steps up from ``node``. Defaults to ``null`` + lastLevel = null + + # (integer) Restrict the maximum depth of items in the menu (relative to ``entryLevel``) maximumLevels = 2 + + # (optional, Node) The node where the menu hierarchy starts. If not specified explicitly the startingPoint is calculated from (``node`` and ``entryLevel``), defaults to ``null`` startingPoint = null - lastLevel = null + + # (string) Filter items by node type (e.g. ``'!My.Site:News,Neos.Neos:Document'``), defaults to ``'Neos.Neos:Document'``. The filter is only used for fetching subItems and is ignored for determining the ``startingPoint`` filter = 'Neos.Neos:Document' + + # (boolean) Whether nodes with ``hiddenInIndex`` should be rendered, defaults to ``false`` renderHiddenInIndex = false - itemCollection = null + + # (boolean) activate the *expensive* calculation of item states defaults to ``false``. calculateItemStates = false + # (optional, array of Nodes) Explicitly set the Node items for the menu (taking precedence over ``startingPoints`` and ``entryLevel`` and ``lastLevel``). The children for each ``Node`` will be fetched taking the ``maximumLevels`` property into account. + itemCollection = null + // This property is used internally by `MenuItemsImplementation` to render each items uri. // It can be modified to change behaviour for all rendered uris. itemUriRenderer = Neos.Neos:NodeUri { From 267d02592850e584a027f1ef4e2e7fa55b3e88e1 Mon Sep 17 00:00:00 2001 From: Jenkins <jenkins@neos.io> Date: Wed, 1 Nov 2023 14:39:50 +0000 Subject: [PATCH 44/53] TASK: Update references [skip ci] --- Neos.Neos/Documentation/References/CommandReference.rst | 2 +- Neos.Neos/Documentation/References/EelHelpersReference.rst | 2 +- .../Documentation/References/FlowQueryOperationReference.rst | 2 +- .../Documentation/References/Signals/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/Signals/Flow.rst | 2 +- Neos.Neos/Documentation/References/Signals/Media.rst | 2 +- Neos.Neos/Documentation/References/Signals/Neos.rst | 2 +- Neos.Neos/Documentation/References/Validators/Flow.rst | 2 +- Neos.Neos/Documentation/References/Validators/Media.rst | 2 +- Neos.Neos/Documentation/References/Validators/Party.rst | 2 +- .../Documentation/References/ViewHelpers/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Form.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Media.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Neos.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Neos.Neos/Documentation/References/CommandReference.rst b/Neos.Neos/Documentation/References/CommandReference.rst index ee73a6130ea..ccf8f9ca262 100644 --- a/Neos.Neos/Documentation/References/CommandReference.rst +++ b/Neos.Neos/Documentation/References/CommandReference.rst @@ -19,7 +19,7 @@ commands that may be available, use:: ./flow help -The following reference was automatically generated from code on 2023-10-21 +The following reference was automatically generated from code on 2023-11-01 .. _`Neos Command Reference: NEOS.CONTENTREPOSITORY`: diff --git a/Neos.Neos/Documentation/References/EelHelpersReference.rst b/Neos.Neos/Documentation/References/EelHelpersReference.rst index ccb1506f3cc..0b90327e473 100644 --- a/Neos.Neos/Documentation/References/EelHelpersReference.rst +++ b/Neos.Neos/Documentation/References/EelHelpersReference.rst @@ -3,7 +3,7 @@ Eel Helpers Reference ===================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Eel Helpers Reference: Api`: diff --git a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst index 582e91c9267..313561e3f2d 100644 --- a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst +++ b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst @@ -3,7 +3,7 @@ FlowQuery Operation Reference ============================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`FlowQuery Operation Reference: add`: diff --git a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst index 66dd6924281..62af6be6d29 100644 --- a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository Signals Reference ==================================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Content Repository Signals Reference: Context (``Neos\ContentRepository\Domain\Service\Context``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Flow.rst b/Neos.Neos/Documentation/References/Signals/Flow.rst index 359257c7ed2..b0c21600b1c 100644 --- a/Neos.Neos/Documentation/References/Signals/Flow.rst +++ b/Neos.Neos/Documentation/References/Signals/Flow.rst @@ -3,7 +3,7 @@ Flow Signals Reference ====================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Flow Signals Reference: AbstractAdvice (``Neos\Flow\Aop\Advice\AbstractAdvice``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Media.rst b/Neos.Neos/Documentation/References/Signals/Media.rst index 350cb44df2c..c85d2749301 100644 --- a/Neos.Neos/Documentation/References/Signals/Media.rst +++ b/Neos.Neos/Documentation/References/Signals/Media.rst @@ -3,7 +3,7 @@ Media Signals Reference ======================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Media Signals Reference: AssetCollectionController (``Neos\Media\Browser\Controller\AssetCollectionController``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Neos.rst b/Neos.Neos/Documentation/References/Signals/Neos.rst index 937847a87a7..2ebf0272945 100644 --- a/Neos.Neos/Documentation/References/Signals/Neos.rst +++ b/Neos.Neos/Documentation/References/Signals/Neos.rst @@ -3,7 +3,7 @@ Neos Signals Reference ====================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Neos Signals Reference: AbstractCreate (``Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate``)`: diff --git a/Neos.Neos/Documentation/References/Validators/Flow.rst b/Neos.Neos/Documentation/References/Validators/Flow.rst index e4c5c45cf0f..f27c7162447 100644 --- a/Neos.Neos/Documentation/References/Validators/Flow.rst +++ b/Neos.Neos/Documentation/References/Validators/Flow.rst @@ -3,7 +3,7 @@ Flow Validator Reference ======================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Flow Validator Reference: AggregateBoundaryValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Media.rst b/Neos.Neos/Documentation/References/Validators/Media.rst index 9e9407aff36..4ab02a7bfcf 100644 --- a/Neos.Neos/Documentation/References/Validators/Media.rst +++ b/Neos.Neos/Documentation/References/Validators/Media.rst @@ -3,7 +3,7 @@ Media Validator Reference ========================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Media Validator Reference: ImageOrientationValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Party.rst b/Neos.Neos/Documentation/References/Validators/Party.rst index 7f7479f57ad..4a838dacc18 100644 --- a/Neos.Neos/Documentation/References/Validators/Party.rst +++ b/Neos.Neos/Documentation/References/Validators/Party.rst @@ -3,7 +3,7 @@ Party Validator Reference ========================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Party Validator Reference: AimAddressValidator`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst index b073d7b8500..096af561261 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository ViewHelper Reference ####################################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Content Repository ViewHelper Reference: PaginateViewHelper`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst index 6f6aaf4574e..8fd558f5957 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst @@ -3,7 +3,7 @@ FluidAdaptor ViewHelper Reference ################################# -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`FluidAdaptor ViewHelper Reference: f:debug`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst index 032e57f64b7..31197ac31f0 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst @@ -3,7 +3,7 @@ Form ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Form ViewHelper Reference: neos.form:form`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst index d578688b50b..9879c19d84d 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst @@ -3,7 +3,7 @@ Fusion ViewHelper Reference ########################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Fusion ViewHelper Reference: fusion:render`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst index d25b770036d..895e7e0a245 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst @@ -3,7 +3,7 @@ Media ViewHelper Reference ########################## -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Media ViewHelper Reference: neos.media:fileTypeIcon`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst index c5191e870e1..a82cac259fe 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst @@ -3,7 +3,7 @@ Neos ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Neos ViewHelper Reference: neos:backend.authenticationProviderLabel`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst index 6a3a594c574..adfa88e2413 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst @@ -3,7 +3,7 @@ TYPO3 Fluid ViewHelper Reference ################################ -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`TYPO3 Fluid ViewHelper Reference: f:alias`: From 40c9d052dd9b4ad494583642585e5c5a8acd50b3 Mon Sep 17 00:00:00 2001 From: Jenkins <jenkins@neos.io> Date: Wed, 1 Nov 2023 14:39:58 +0000 Subject: [PATCH 45/53] TASK: Update references [skip ci] --- Neos.Neos/Documentation/References/CommandReference.rst | 2 +- Neos.Neos/Documentation/References/EelHelpersReference.rst | 2 +- .../Documentation/References/FlowQueryOperationReference.rst | 2 +- .../Documentation/References/Signals/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/Signals/Flow.rst | 2 +- Neos.Neos/Documentation/References/Signals/Media.rst | 2 +- Neos.Neos/Documentation/References/Signals/Neos.rst | 2 +- Neos.Neos/Documentation/References/Validators/Flow.rst | 2 +- Neos.Neos/Documentation/References/Validators/Media.rst | 2 +- Neos.Neos/Documentation/References/Validators/Party.rst | 2 +- .../Documentation/References/ViewHelpers/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Form.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Media.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Neos.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Neos.Neos/Documentation/References/CommandReference.rst b/Neos.Neos/Documentation/References/CommandReference.rst index ee73a6130ea..ccf8f9ca262 100644 --- a/Neos.Neos/Documentation/References/CommandReference.rst +++ b/Neos.Neos/Documentation/References/CommandReference.rst @@ -19,7 +19,7 @@ commands that may be available, use:: ./flow help -The following reference was automatically generated from code on 2023-10-21 +The following reference was automatically generated from code on 2023-11-01 .. _`Neos Command Reference: NEOS.CONTENTREPOSITORY`: diff --git a/Neos.Neos/Documentation/References/EelHelpersReference.rst b/Neos.Neos/Documentation/References/EelHelpersReference.rst index 79acd948b5e..d6b96c91df0 100644 --- a/Neos.Neos/Documentation/References/EelHelpersReference.rst +++ b/Neos.Neos/Documentation/References/EelHelpersReference.rst @@ -3,7 +3,7 @@ Eel Helpers Reference ===================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Eel Helpers Reference: Api`: diff --git a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst index 582e91c9267..313561e3f2d 100644 --- a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst +++ b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst @@ -3,7 +3,7 @@ FlowQuery Operation Reference ============================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`FlowQuery Operation Reference: add`: diff --git a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst index 66dd6924281..62af6be6d29 100644 --- a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository Signals Reference ==================================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Content Repository Signals Reference: Context (``Neos\ContentRepository\Domain\Service\Context``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Flow.rst b/Neos.Neos/Documentation/References/Signals/Flow.rst index 359257c7ed2..b0c21600b1c 100644 --- a/Neos.Neos/Documentation/References/Signals/Flow.rst +++ b/Neos.Neos/Documentation/References/Signals/Flow.rst @@ -3,7 +3,7 @@ Flow Signals Reference ====================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Flow Signals Reference: AbstractAdvice (``Neos\Flow\Aop\Advice\AbstractAdvice``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Media.rst b/Neos.Neos/Documentation/References/Signals/Media.rst index 350cb44df2c..c85d2749301 100644 --- a/Neos.Neos/Documentation/References/Signals/Media.rst +++ b/Neos.Neos/Documentation/References/Signals/Media.rst @@ -3,7 +3,7 @@ Media Signals Reference ======================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Media Signals Reference: AssetCollectionController (``Neos\Media\Browser\Controller\AssetCollectionController``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Neos.rst b/Neos.Neos/Documentation/References/Signals/Neos.rst index 937847a87a7..2ebf0272945 100644 --- a/Neos.Neos/Documentation/References/Signals/Neos.rst +++ b/Neos.Neos/Documentation/References/Signals/Neos.rst @@ -3,7 +3,7 @@ Neos Signals Reference ====================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Neos Signals Reference: AbstractCreate (``Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate``)`: diff --git a/Neos.Neos/Documentation/References/Validators/Flow.rst b/Neos.Neos/Documentation/References/Validators/Flow.rst index e4c5c45cf0f..f27c7162447 100644 --- a/Neos.Neos/Documentation/References/Validators/Flow.rst +++ b/Neos.Neos/Documentation/References/Validators/Flow.rst @@ -3,7 +3,7 @@ Flow Validator Reference ======================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Flow Validator Reference: AggregateBoundaryValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Media.rst b/Neos.Neos/Documentation/References/Validators/Media.rst index 9e9407aff36..4ab02a7bfcf 100644 --- a/Neos.Neos/Documentation/References/Validators/Media.rst +++ b/Neos.Neos/Documentation/References/Validators/Media.rst @@ -3,7 +3,7 @@ Media Validator Reference ========================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Media Validator Reference: ImageOrientationValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Party.rst b/Neos.Neos/Documentation/References/Validators/Party.rst index 7f7479f57ad..4a838dacc18 100644 --- a/Neos.Neos/Documentation/References/Validators/Party.rst +++ b/Neos.Neos/Documentation/References/Validators/Party.rst @@ -3,7 +3,7 @@ Party Validator Reference ========================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Party Validator Reference: AimAddressValidator`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst index b073d7b8500..096af561261 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository ViewHelper Reference ####################################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Content Repository ViewHelper Reference: PaginateViewHelper`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst index 6f6aaf4574e..8fd558f5957 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst @@ -3,7 +3,7 @@ FluidAdaptor ViewHelper Reference ################################# -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`FluidAdaptor ViewHelper Reference: f:debug`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst index 032e57f64b7..31197ac31f0 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst @@ -3,7 +3,7 @@ Form ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Form ViewHelper Reference: neos.form:form`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst index d578688b50b..9879c19d84d 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst @@ -3,7 +3,7 @@ Fusion ViewHelper Reference ########################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Fusion ViewHelper Reference: fusion:render`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst index d25b770036d..895e7e0a245 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst @@ -3,7 +3,7 @@ Media ViewHelper Reference ########################## -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Media ViewHelper Reference: neos.media:fileTypeIcon`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst index c5191e870e1..a82cac259fe 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst @@ -3,7 +3,7 @@ Neos ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Neos ViewHelper Reference: neos:backend.authenticationProviderLabel`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst index 6a3a594c574..adfa88e2413 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst @@ -3,7 +3,7 @@ TYPO3 Fluid ViewHelper Reference ################################ -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`TYPO3 Fluid ViewHelper Reference: f:alias`: From b2a09a73185cadcaf32e0154bbb50c3be59b14bb Mon Sep 17 00:00:00 2001 From: Jenkins <jenkins@neos.io> Date: Wed, 1 Nov 2023 14:42:16 +0000 Subject: [PATCH 46/53] TASK: Update references [skip ci] --- Neos.Neos/Documentation/References/CommandReference.rst | 2 +- Neos.Neos/Documentation/References/EelHelpersReference.rst | 2 +- .../Documentation/References/FlowQueryOperationReference.rst | 2 +- .../Documentation/References/Signals/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/Signals/Flow.rst | 2 +- Neos.Neos/Documentation/References/Signals/Media.rst | 2 +- Neos.Neos/Documentation/References/Signals/Neos.rst | 2 +- Neos.Neos/Documentation/References/Validators/Flow.rst | 2 +- Neos.Neos/Documentation/References/Validators/Media.rst | 2 +- Neos.Neos/Documentation/References/Validators/Party.rst | 2 +- .../Documentation/References/ViewHelpers/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Form.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Media.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Neos.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Neos.Neos/Documentation/References/CommandReference.rst b/Neos.Neos/Documentation/References/CommandReference.rst index ee73a6130ea..ccf8f9ca262 100644 --- a/Neos.Neos/Documentation/References/CommandReference.rst +++ b/Neos.Neos/Documentation/References/CommandReference.rst @@ -19,7 +19,7 @@ commands that may be available, use:: ./flow help -The following reference was automatically generated from code on 2023-10-21 +The following reference was automatically generated from code on 2023-11-01 .. _`Neos Command Reference: NEOS.CONTENTREPOSITORY`: diff --git a/Neos.Neos/Documentation/References/EelHelpersReference.rst b/Neos.Neos/Documentation/References/EelHelpersReference.rst index 79acd948b5e..d6b96c91df0 100644 --- a/Neos.Neos/Documentation/References/EelHelpersReference.rst +++ b/Neos.Neos/Documentation/References/EelHelpersReference.rst @@ -3,7 +3,7 @@ Eel Helpers Reference ===================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Eel Helpers Reference: Api`: diff --git a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst index 582e91c9267..313561e3f2d 100644 --- a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst +++ b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst @@ -3,7 +3,7 @@ FlowQuery Operation Reference ============================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`FlowQuery Operation Reference: add`: diff --git a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst index 66dd6924281..62af6be6d29 100644 --- a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository Signals Reference ==================================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Content Repository Signals Reference: Context (``Neos\ContentRepository\Domain\Service\Context``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Flow.rst b/Neos.Neos/Documentation/References/Signals/Flow.rst index 359257c7ed2..b0c21600b1c 100644 --- a/Neos.Neos/Documentation/References/Signals/Flow.rst +++ b/Neos.Neos/Documentation/References/Signals/Flow.rst @@ -3,7 +3,7 @@ Flow Signals Reference ====================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Flow Signals Reference: AbstractAdvice (``Neos\Flow\Aop\Advice\AbstractAdvice``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Media.rst b/Neos.Neos/Documentation/References/Signals/Media.rst index 350cb44df2c..c85d2749301 100644 --- a/Neos.Neos/Documentation/References/Signals/Media.rst +++ b/Neos.Neos/Documentation/References/Signals/Media.rst @@ -3,7 +3,7 @@ Media Signals Reference ======================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Media Signals Reference: AssetCollectionController (``Neos\Media\Browser\Controller\AssetCollectionController``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Neos.rst b/Neos.Neos/Documentation/References/Signals/Neos.rst index 937847a87a7..2ebf0272945 100644 --- a/Neos.Neos/Documentation/References/Signals/Neos.rst +++ b/Neos.Neos/Documentation/References/Signals/Neos.rst @@ -3,7 +3,7 @@ Neos Signals Reference ====================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Neos Signals Reference: AbstractCreate (``Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate``)`: diff --git a/Neos.Neos/Documentation/References/Validators/Flow.rst b/Neos.Neos/Documentation/References/Validators/Flow.rst index e4c5c45cf0f..f27c7162447 100644 --- a/Neos.Neos/Documentation/References/Validators/Flow.rst +++ b/Neos.Neos/Documentation/References/Validators/Flow.rst @@ -3,7 +3,7 @@ Flow Validator Reference ======================== -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Flow Validator Reference: AggregateBoundaryValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Media.rst b/Neos.Neos/Documentation/References/Validators/Media.rst index 9e9407aff36..4ab02a7bfcf 100644 --- a/Neos.Neos/Documentation/References/Validators/Media.rst +++ b/Neos.Neos/Documentation/References/Validators/Media.rst @@ -3,7 +3,7 @@ Media Validator Reference ========================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Media Validator Reference: ImageOrientationValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Party.rst b/Neos.Neos/Documentation/References/Validators/Party.rst index 7f7479f57ad..4a838dacc18 100644 --- a/Neos.Neos/Documentation/References/Validators/Party.rst +++ b/Neos.Neos/Documentation/References/Validators/Party.rst @@ -3,7 +3,7 @@ Party Validator Reference ========================= -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Party Validator Reference: AimAddressValidator`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst index b073d7b8500..096af561261 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository ViewHelper Reference ####################################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Content Repository ViewHelper Reference: PaginateViewHelper`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst index 6f6aaf4574e..8fd558f5957 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst @@ -3,7 +3,7 @@ FluidAdaptor ViewHelper Reference ################################# -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`FluidAdaptor ViewHelper Reference: f:debug`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst index 032e57f64b7..31197ac31f0 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst @@ -3,7 +3,7 @@ Form ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Form ViewHelper Reference: neos.form:form`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst index d578688b50b..9879c19d84d 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst @@ -3,7 +3,7 @@ Fusion ViewHelper Reference ########################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Fusion ViewHelper Reference: fusion:render`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst index d25b770036d..895e7e0a245 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst @@ -3,7 +3,7 @@ Media ViewHelper Reference ########################## -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Media ViewHelper Reference: neos.media:fileTypeIcon`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst index c5191e870e1..a82cac259fe 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst @@ -3,7 +3,7 @@ Neos ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`Neos ViewHelper Reference: neos:backend.authenticationProviderLabel`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst index 6a3a594c574..adfa88e2413 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst @@ -3,7 +3,7 @@ TYPO3 Fluid ViewHelper Reference ################################ -This reference was automatically generated from code on 2023-10-21 +This reference was automatically generated from code on 2023-11-01 .. _`TYPO3 Fluid ViewHelper Reference: f:alias`: From 951cf3c2de531cde001cb5ed1fc7f2df90eb8710 Mon Sep 17 00:00:00 2001 From: Bernhard Schmitt <schmitt@sitegeist.de> Date: Wed, 1 Nov 2023 16:52:34 +0100 Subject: [PATCH 47/53] 4327 - Expose a subgraph's identity --- .../DoctrineDbalContentGraphProjection.php | 4 ++- ...trineDbalContentGraphProjectionFactory.php | 1 + .../src/Domain/Repository/ContentGraph.php | 3 ++ .../src/Domain/Repository/ContentSubgraph.php | 13 +++++++++ .../Projection/HypergraphProjection.php | 3 ++ .../Domain/Repository/ContentHypergraph.php | 3 ++ .../Repository/ContentSubhypergraph.php | 29 ++++++++++++++----- .../src/HypergraphProjectionFactory.php | 1 + .../ContentSubgraphWithRuntimeCaches.php | 6 ++++ .../ContentGraph/ContentSubgraphInterface.php | 9 ++++++ 10 files changed, 63 insertions(+), 9 deletions(-) diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjection.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjection.php index e44fd08d16e..88477f51f32 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjection.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjection.php @@ -23,6 +23,7 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\EventStore\EventInterface; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Feature\ContentStreamForking\Event\ContentStreamWasForked; use Neos\ContentRepository\Core\Feature\ContentStreamRemoval\Event\ContentStreamWasRemoved; use Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Event\DimensionShineThroughWasAdded; @@ -46,7 +47,6 @@ use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\NodeType\NodeTypeName; -use Neos\ContentRepository\Core\Projection\CatchUpHookFactoryInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\Timestamps; use Neos\ContentRepository\Core\Projection\ProjectionInterface; use Neos\ContentRepository\Core\Projection\WithMarkStaleInterface; @@ -86,6 +86,7 @@ final class DoctrineDbalContentGraphProjection implements ProjectionInterface, W public function __construct( private readonly DbalClientInterface $dbalClient, private readonly NodeFactory $nodeFactory, + private readonly ContentRepositoryId $contentRepositoryId, private readonly NodeTypeManager $nodeTypeManager, private readonly ProjectionContentGraph $projectionContentGraph, private readonly string $tableNamePrefix, @@ -212,6 +213,7 @@ public function getState(): ContentGraph $this->contentGraph = new ContentGraph( $this->dbalClient, $this->nodeFactory, + $this->contentRepositoryId, $this->nodeTypeManager, $this->tableNamePrefix ); diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjectionFactory.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjectionFactory.php index a264b39f8d7..d3022e2c290 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjectionFactory.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjectionFactory.php @@ -48,6 +48,7 @@ public function build( $projectionFactoryDependencies->nodeTypeManager, $projectionFactoryDependencies->propertyConverter ), + $projectionFactoryDependencies->contentRepositoryId, $projectionFactoryDependencies->nodeTypeManager, new ProjectionContentGraph( $this->dbalClient, diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentGraph.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentGraph.php index 126200f98a3..3e39613f33b 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentGraph.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentGraph.php @@ -19,6 +19,7 @@ use Neos\ContentGraph\DoctrineDbalAdapter\DoctrineDbalContentGraphProjection; use Neos\ContentGraph\DoctrineDbalAdapter\Domain\Projection\NodeRelationAnchorPoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentGraphWithRuntimeCaches\ContentSubgraphWithRuntimeCaches; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindRootNodeAggregatesFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregates; @@ -56,6 +57,7 @@ final class ContentGraph implements ContentGraphInterface public function __construct( private readonly DbalClientInterface $client, private readonly NodeFactory $nodeFactory, + private readonly ContentRepositoryId $contentRepositoryId, private readonly NodeTypeManager $nodeTypeManager, private readonly string $tableNamePrefix ) { @@ -70,6 +72,7 @@ final public function getSubgraph( if (!isset($this->subgraphs[$index])) { $this->subgraphs[$index] = new ContentSubgraphWithRuntimeCaches( new ContentSubgraph( + $this->contentRepositoryId, $contentStreamId, $dimensionSpacePoint, $visibilityConstraints, diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentSubgraph.php b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentSubgraph.php index 798b59ef07c..200d65faee6 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentSubgraph.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Repository/ContentSubgraph.php @@ -21,10 +21,12 @@ use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Infrastructure\DbalClientInterface; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\Projection\ContentGraph\AbsoluteNodePath; +use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphIdentity; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\CountAncestorNodesFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\CountBackReferencesFilter; @@ -102,6 +104,7 @@ final class ContentSubgraph implements ContentSubgraphInterface private int $dynamicParameterCount = 0; public function __construct( + private readonly ContentRepositoryId $contentRepositoryId, private readonly ContentStreamId $contentStreamId, private readonly DimensionSpacePoint $dimensionSpacePoint, private readonly VisibilityConstraints $visibilityConstraints, @@ -112,6 +115,16 @@ public function __construct( ) { } + public function getIdentity(): ContentSubgraphIdentity + { + return ContentSubgraphIdentity::create( + $this->contentRepositoryId, + $this->contentStreamId, + $this->dimensionSpacePoint, + $this->visibilityConstraints + ); + } + public function findChildNodes(NodeAggregateId $parentNodeAggregateId, FindChildNodesFilter $filter): Nodes { $queryBuilder = $this->buildChildNodesQuery($parentNodeAggregateId, $filter); diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/HypergraphProjection.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/HypergraphProjection.php index f9037c9453a..bf8d017432b 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/HypergraphProjection.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/HypergraphProjection.php @@ -31,6 +31,7 @@ use Neos\ContentGraph\PostgreSQLAdapter\Domain\Repository\NodeFactory; use Neos\ContentGraph\PostgreSQLAdapter\Infrastructure\PostgresDbalClientInterface; use Neos\ContentRepository\Core\EventStore\EventInterface; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\Feature\ContentStreamForking\Event\ContentStreamWasForked; use Neos\ContentRepository\Core\Feature\NodeCreation\Event\NodeAggregateWithNodeWasCreated; use Neos\ContentRepository\Core\Feature\NodeDisabling\Event\NodeAggregateWasDisabled; @@ -81,6 +82,7 @@ final class HypergraphProjection implements ProjectionInterface public function __construct( private readonly PostgresDbalClientInterface $databaseClient, private readonly NodeFactory $nodeFactory, + private readonly ContentRepositoryId $contentRepositoryId, private readonly NodeTypeManager $nodeTypeManager, private readonly string $tableNamePrefix, ) { @@ -221,6 +223,7 @@ public function getState(): ContentHypergraph $this->contentHypergraph = new ContentHypergraph( $this->databaseClient, $this->nodeFactory, + $this->contentRepositoryId, $this->nodeTypeManager, $this->tableNamePrefix ); diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentHypergraph.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentHypergraph.php index 58244d9823b..f45b29b8e34 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentHypergraph.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentHypergraph.php @@ -23,6 +23,7 @@ use Neos\ContentGraph\PostgreSQLAdapter\Infrastructure\PostgresDbalClientInterface; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindRootNodeAggregatesFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregates; @@ -59,6 +60,7 @@ final class ContentHypergraph implements ContentGraphInterface public function __construct( PostgresDbalClientInterface $databaseClient, NodeFactory $nodeFactory, + private readonly ContentRepositoryId $contentRepositoryId, private readonly NodeTypeManager $nodeTypeManager, private readonly string $tableNamePrefix ) { @@ -74,6 +76,7 @@ public function getSubgraph( $index = $contentStreamId->value . '-' . $dimensionSpacePoint->hash . '-' . $visibilityConstraints->getHash(); if (!isset($this->subhypergraphs[$index])) { $this->subhypergraphs[$index] = new ContentSubhypergraph( + $this->contentRepositoryId, $contentStreamId, $dimensionSpacePoint, $visibilityConstraints, diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentSubhypergraph.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentSubhypergraph.php index 6f1bf311ec7..01c50b85b1c 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentSubhypergraph.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/ContentSubhypergraph.php @@ -24,9 +24,11 @@ use Neos\ContentGraph\PostgreSQLAdapter\Domain\Repository\Query\QueryUtility; use Neos\ContentGraph\PostgreSQLAdapter\Infrastructure\PostgresDbalClientInterface; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; +use Neos\ContentRepository\Core\Factory\ContentRepositoryId; use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\Projection\ContentGraph\AbsoluteNodePath; +use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphIdentity; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindBackReferencesFilter; @@ -69,19 +71,30 @@ * * @internal but the public {@see ContentSubgraphInterface} is API */ -final class ContentSubhypergraph implements ContentSubgraphInterface +final readonly class ContentSubhypergraph implements ContentSubgraphInterface { public function __construct( - private readonly ContentStreamId $contentStreamId, - private readonly DimensionSpacePoint $dimensionSpacePoint, - private readonly VisibilityConstraints $visibilityConstraints, - private readonly PostgresDbalClientInterface $databaseClient, - private readonly NodeFactory $nodeFactory, - private readonly NodeTypeManager $nodeTypeManager, - private readonly string $tableNamePrefix + private ContentRepositoryId $contentRepositoryId, + private ContentStreamId $contentStreamId, + private DimensionSpacePoint $dimensionSpacePoint, + private VisibilityConstraints $visibilityConstraints, + private PostgresDbalClientInterface $databaseClient, + private NodeFactory $nodeFactory, + private NodeTypeManager $nodeTypeManager, + private string $tableNamePrefix ) { } + public function getIdentity(): ContentSubgraphIdentity + { + return ContentSubgraphIdentity::create( + $this->contentRepositoryId, + $this->contentStreamId, + $this->dimensionSpacePoint, + $this->visibilityConstraints + ); + } + public function findNodeById(NodeAggregateId $nodeAggregateId): ?Node { $query = HypergraphQuery::create($this->contentStreamId, $this->tableNamePrefix); diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/HypergraphProjectionFactory.php b/Neos.ContentGraph.PostgreSQLAdapter/src/HypergraphProjectionFactory.php index ca4a76375ee..4c3def6eea8 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/HypergraphProjectionFactory.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/HypergraphProjectionFactory.php @@ -43,6 +43,7 @@ public function build( $projectionFactoryDependencies->nodeTypeManager, $projectionFactoryDependencies->propertyConverter ), + $projectionFactoryDependencies->contentRepositoryId, $projectionFactoryDependencies->nodeTypeManager, $tableNamePrefix ); diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentGraphWithRuntimeCaches/ContentSubgraphWithRuntimeCaches.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentGraphWithRuntimeCaches/ContentSubgraphWithRuntimeCaches.php index 85c2c94b614..c8b08e98ca2 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentGraphWithRuntimeCaches/ContentSubgraphWithRuntimeCaches.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentGraphWithRuntimeCaches/ContentSubgraphWithRuntimeCaches.php @@ -16,6 +16,7 @@ use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\Projection\ContentGraph\AbsoluteNodePath; +use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphIdentity; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\CountBackReferencesFilter; @@ -52,6 +53,11 @@ public function __construct( $this->inMemoryCache = new InMemoryCache(); } + public function getIdentity(): ContentSubgraphIdentity + { + return $this->wrappedContentSubgraph->getIdentity(); + } + public function findChildNodes(NodeAggregateId $parentNodeAggregateId, FindChildNodesFilter $filter): Nodes { if (!self::isFilterEmpty($filter)) { diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentSubgraphInterface.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentSubgraphInterface.php index 55a5572edf8..5f65fb6a0f1 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentSubgraphInterface.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/ContentSubgraphInterface.php @@ -48,6 +48,15 @@ */ interface ContentSubgraphInterface extends \JsonSerializable { + /** + * Returns the subgraph's identity, i.e. the current perspective we look at content from, composed of + * * the content repository the subgraph belongs to + * * the ID of the content stream we are currently working in + * * the dimension space point we are currently looking at + * * the applied visibility constraints + */ + public function getIdentity(): ContentSubgraphIdentity; + /** * Find a single node by its aggregate id * From 714a321da118b8bb29def7fcd47d81365d828913 Mon Sep 17 00:00:00 2001 From: Martin Ficzel <ficzel@sitegeist.de> Date: Wed, 1 Nov 2023 16:21:49 +0100 Subject: [PATCH 48/53] TASK: Initialize `node` as `${documentNode}` and include currentNode in CurrentRootlineNodeAggregateIds --- .../AbstractMenuItemsImplementation.php | 57 +++++-------------- .../DimensionsMenuItemsImplementation.php | 16 +++--- .../Fusion/MenuItemsImplementation.php | 53 ++++++++--------- .../References/NeosFusionReference.rst | 5 +- .../Fusion/Prototypes/BreadcrumbMenu.fusion | 5 ++ .../Prototypes/BreadcrumbMenuItems.fusion | 6 ++ .../Fusion/Prototypes/DimensionsMenu.fusion | 5 +- .../Prototypes/DimensionsMenuItems.fusion | 3 + .../Private/Fusion/Prototypes/Menu.fusion | 4 +- .../Fusion/Prototypes/MenuItems.fusion | 4 +- 10 files changed, 72 insertions(+), 86 deletions(-) diff --git a/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php index d37385261f4..6e92d883fd5 100644 --- a/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php @@ -46,13 +46,6 @@ abstract class AbstractMenuItemsImplementation extends AbstractFusionObject */ protected $currentNode; - /** - * Internal cache for the currentLevel tsValue. - * - * @var integer - */ - protected $currentLevel; - /** * Internal cache for the renderHiddenInIndex property. * @@ -67,13 +60,6 @@ abstract class AbstractMenuItemsImplementation extends AbstractFusionObject */ protected $calculateItemStates; - /** - * Rootline of all nodes from the current node to the site root node, keys are depth of nodes. - * - * @var array<Node> - */ - protected $currentNodeRootline; - #[Flow\Inject] protected ContentRepositoryRegistry $contentRepositoryRegistry; @@ -104,6 +90,19 @@ public function getRenderHiddenInIndex() return $this->renderHiddenInIndex; } + /** + * The node the menu is built from, all relative specifications will + * use this as a base + */ + public function getCurrentNode(): Node + { + if ($this->currentNode === null) { + $this->currentNode = $this->fusionValue('node'); + } + + return $this->currentNode; + } + /** * Main API method which sends the to-be-rendered data to Fluid * @@ -112,9 +111,6 @@ public function getRenderHiddenInIndex() public function getItems(): array { if ($this->items === null) { - $fusionContext = $this->runtime->getCurrentContext(); - $this->currentNode = $fusionContext['activeNode'] ?? $fusionContext['documentNode']; - $this->currentLevel = 1; $this->items = $this->buildItems(); } @@ -163,33 +159,6 @@ protected function isNodeHidden(Node $node) return $node->getProperty('_hiddenInIndex'); } - /** - * Get the rootline from the current node up to the site node. - * - * @return array<int,Node> nodes, indexed by depth - */ - protected function getCurrentNodeRootline(): array - { - if ($this->currentNodeRootline === null) { - $rootline = []; - $ancestors = $this->contentRepositoryRegistry->subgraphForNode($this->currentNode) - ->findAncestorNodes( - $this->currentNode->nodeAggregateId, - FindAncestorNodesFilter::create() - ); - foreach ($ancestors->reverse() as $i => $ancestor) { - if (!$ancestor->classification->isRoot()) { - $rootline[$i] = $ancestor; - } - } - $rootline[] = $this->currentNode; - - $this->currentNodeRootline = $rootline; - } - - return $this->currentNodeRootline; - } - protected function buildUri(Node $node): string { $this->runtime->pushContextArray([ diff --git a/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php index 6877fe98c6d..97fff10f134 100644 --- a/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php @@ -44,7 +44,9 @@ public function getDimension(): array protected function buildItems(): array { $menuItems = []; - $contentRepositoryId = $this->currentNode->subgraphIdentity->contentRepositoryId; + $currentNode = $this->getCurrentNode(); + + $contentRepositoryId = $currentNode->subgraphIdentity->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get( $contentRepositoryId, ); @@ -56,28 +58,28 @@ protected function buildItems(): array assert($dimensionMenuItemsImplementationInternals instanceof DimensionsMenuItemsImplementationInternals); $interDimensionalVariationGraph = $dimensionMenuItemsImplementationInternals->interDimensionalVariationGraph; - $currentDimensionSpacePoint = $this->currentNode->subgraphIdentity->dimensionSpacePoint; + $currentDimensionSpacePoint = $currentNode->subgraphIdentity->dimensionSpacePoint; $contentDimensionIdentifierToLimitTo = $this->getContentDimensionIdentifierToLimitTo(); foreach ($interDimensionalVariationGraph->getDimensionSpacePoints() as $dimensionSpacePoint) { $variant = null; if ($this->isDimensionSpacePointRelevant($dimensionSpacePoint)) { if ($dimensionSpacePoint->equals($currentDimensionSpacePoint)) { - $variant = $this->currentNode; + $variant = $currentNode; } else { $variant = $contentRepository->getContentGraph() ->getSubgraph( - $this->currentNode->subgraphIdentity->contentStreamId, + $currentNode->subgraphIdentity->contentStreamId, $dimensionSpacePoint, - $this->currentNode->subgraphIdentity->visibilityConstraints, + $currentNode->subgraphIdentity->visibilityConstraints, ) - ->findNodeById($this->currentNode->nodeAggregateId); + ->findNodeById($currentNode->nodeAggregateId); } if (!$variant && $this->includeGeneralizations() && $contentDimensionIdentifierToLimitTo) { $variant = $this->findClosestGeneralizationMatchingDimensionValue( $dimensionSpacePoint, $contentDimensionIdentifierToLimitTo, - $this->currentNode->nodeAggregateId, + $currentNode->nodeAggregateId, $dimensionMenuItemsImplementationInternals, $contentRepository ); diff --git a/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php index 79d5b34feb1..3560453e807 100644 --- a/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/MenuItemsImplementation.php @@ -57,7 +57,7 @@ class MenuItemsImplementation extends AbstractMenuItemsImplementation /** * Internal cache for the ancestors aggregate ids of the currentNode. */ - protected ?NodeAggregateIds $currentNodeAncestorAggregateIds = null; + protected ?NodeAggregateIds $currentNodeRootlineAggregateIds = null; /** * Runtime cache for the node type constraints to be applied @@ -75,7 +75,7 @@ class MenuItemsImplementation extends AbstractMenuItemsImplementation * -2 = two levels above the current page * ... */ - public function getEntryLevel(): int + protected function getEntryLevel(): int { return $this->fusionValue('entryLevel'); } @@ -83,7 +83,7 @@ public function getEntryLevel(): int /** * NodeType filter for nodes displayed in menu */ - public function getFilter(): string + protected function getFilter(): string { $filter = $this->fusionValue('filter'); if ($filter === null) { @@ -96,7 +96,7 @@ public function getFilter(): string /** * Maximum number of levels which should be rendered in this menu. */ - public function getMaximumLevels(): int + protected function getMaximumLevels(): int { if ($this->maximumLevels === null) { $this->maximumLevels = $this->fusionValue('maximumLevels'); @@ -111,7 +111,7 @@ public function getMaximumLevels(): int /** * Return evaluated lastLevel value. */ - public function getLastLevel(): ?int + protected function getLastLevel(): ?int { if ($this->lastLevel === null) { $this->lastLevel = $this->fusionValue('lastLevel'); @@ -123,7 +123,7 @@ public function getLastLevel(): ?int return $this->lastLevel; } - public function getStartingPoint(): ?Node + protected function getStartingPoint(): ?Node { if ($this->startingPoint === null) { $this->startingPoint = $this->fusionValue('startingPoint'); @@ -135,7 +135,7 @@ public function getStartingPoint(): ?Node /** * @return array<int,Node>|Nodes|null */ - public function getItemCollection(): array|Nodes|null + protected function getItemCollection(): array|Nodes|null { return $this->fusionValue('itemCollection'); } @@ -149,7 +149,7 @@ public function getItemCollection(): array|Nodes|null */ protected function buildItems(): array { - $subgraph = $this->contentRepositoryRegistry->subgraphForNode($this->currentNode); + $subgraph = $this->contentRepositoryRegistry->subgraphForNode($this->getCurrentNode()); if (!is_null($this->getItemCollection())) { $items = []; foreach ($this->getItemCollection() as $node) { @@ -192,8 +192,8 @@ protected function buildItems(): array $maxLevelsBasedOnLastLevel = max($lastLevels - $depthOfEntryParentNodeAggregateId, 0); $maximumLevels = min($maximumLevels, $maxLevelsBasedOnLastLevel); } elseif ($lastLevels < 0) { - $currentNodeAncestorAggregateIds = $this->getCurrentNodeAncestorAggregateIds(); - $depthOfCurrentDocument = count(iterator_to_array($currentNodeAncestorAggregateIds)); + $currentNodeAncestorAggregateIds = $this->getCurrentNodeRootlineAggregateIds(); + $depthOfCurrentDocument = count(iterator_to_array($currentNodeAncestorAggregateIds)) - 1; $maxLevelsBasedOnLastLevel = max($depthOfCurrentDocument + $lastLevels - $depthOfEntryParentNodeAggregateId + 1, 0); $maximumLevels = min($maximumLevels, $maxLevelsBasedOnLastLevel); } @@ -260,8 +260,7 @@ protected function buildMenuItemFromSubtree(Subtree $subtree, int $startLevel = */ protected function findMenuStartingPointAggregateId(): ?NodeAggregateId { - $fusionContext = $this->runtime->getCurrentContext(); - $traversalStartingPoint = $this->getStartingPoint() ?: $fusionContext['node'] ?? null; + $traversalStartingPoint = $this->getStartingPoint() ?: $this->getCurrentNode(); if (!$traversalStartingPoint instanceof Node) { throw new FusionException( @@ -273,17 +272,11 @@ protected function findMenuStartingPointAggregateId(): ?NodeAggregateId if ($this->getEntryLevel() === 0) { return $traversalStartingPoint->nodeAggregateId; } elseif ($this->getEntryLevel() < 0) { - $ancestorNodeAggregateIds = $this->getCurrentNodeAncestorAggregateIds(); - if ($ancestorNodeAggregateIds === null) { - return null; - } + $ancestorNodeAggregateIds = $this->getCurrentNodeRootlineAggregateIds(); $ancestorNodeAggregateIdArray = array_values(iterator_to_array($ancestorNodeAggregateIds)); - return $ancestorNodeAggregateIdArray[$this->getEntryLevel() * -1 - 1] ?? null; + return $ancestorNodeAggregateIdArray[$this->getEntryLevel() * -1] ?? null; } else { - $ancestorNodeAggregateIds = $this->getCurrentNodeAncestorAggregateIds(); - if ($ancestorNodeAggregateIds === null) { - return null; - } + $ancestorNodeAggregateIds = $this->getCurrentNodeRootlineAggregateIds(); $ancestorNodeAggregateIdArray = array_reverse(array_values(iterator_to_array($ancestorNodeAggregateIds))); return $ancestorNodeAggregateIdArray[$this->getEntryLevel() - 1] ?? null; } @@ -297,12 +290,12 @@ protected function getNodeTypeConstraints(): NodeTypeConstraints return $this->nodeTypeConstraints; } - public function getCurrentNodeAncestorAggregateIds(): NodeAggregateIds + protected function getCurrentNodeRootlineAggregateIds(): NodeAggregateIds { - if ($this->currentNodeAncestorAggregateIds instanceof NodeAggregateIds) { - return $this->currentNodeAncestorAggregateIds; + if ($this->currentNodeRootlineAggregateIds instanceof NodeAggregateIds) { + return $this->currentNodeRootlineAggregateIds; } - $subgraph = $this->contentRepositoryRegistry->subgraphForNode($this->currentNode); + $subgraph = $this->contentRepositoryRegistry->subgraphForNode($this->getCurrentNode()); $currentNodeAncestors = $subgraph->findAncestorNodes( $this->currentNode->nodeAggregateId, FindAncestorNodesFilter::create( @@ -314,16 +307,18 @@ public function getCurrentNodeAncestorAggregateIds(): NodeAggregateIds ) ); - $this->currentNodeAncestorAggregateIds = NodeAggregateIds::fromNodes($currentNodeAncestors); - return $this->currentNodeAncestorAggregateIds; + $this->currentNodeRootlineAggregateIds = NodeAggregateIds::create($this->currentNode->nodeAggregateId) + ->merge(NodeAggregateIds::fromNodes($currentNodeAncestors)); + + return $this->currentNodeRootlineAggregateIds; } protected function calculateItemState(Node $node): MenuItemState { - if ($node->nodeAggregateId->equals($this->currentNode->nodeAggregateId)) { + if ($node->nodeAggregateId->equals($this->getCurrentNode()->nodeAggregateId)) { return MenuItemState::CURRENT; } - if ($this->getCurrentNodeAncestorAggregateIds()->contain($node->nodeAggregateId)) { + if ($this->getCurrentNodeRootlineAggregateIds()->contain($node->nodeAggregateId)) { return MenuItemState::ACTIVE; } return MenuItemState::NORMAL; diff --git a/Neos.Neos/Documentation/References/NeosFusionReference.rst b/Neos.Neos/Documentation/References/NeosFusionReference.rst index 5be4c9270f1..596997ab1f2 100644 --- a/Neos.Neos/Documentation/References/NeosFusionReference.rst +++ b/Neos.Neos/Documentation/References/NeosFusionReference.rst @@ -1006,6 +1006,7 @@ Render a breadcrumb (ancestor documents). The following properties are passed over to :ref:`Neos_Neos__BreadcrumbMenuItems` internally: +:node: (Node) The current node to render the menu for. Defaults to ``documentNode`` from the fusion context :maximumLevels: (integer) Restrict the maximum depth of items in the menu, defaults to ``0`` :renderHiddenInIndex: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to ``false``. :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` @@ -1032,6 +1033,7 @@ Create links to other node variants (e.g. variants of the current node in other The following fusion properties are passed over to :ref:`Neos_Neos__DimensionsMenuItems` internally: +:node: (Node) The current node used to calculate the Menu. Defaults to ``documentNode`` from the fusion context :dimension: (optional, string): name of the dimension which this menu should be based on. Example: "language". :presets: (optional, array): If set, the presets rendered will be taken from this list of preset identifiers :includeAllPresets: (boolean, default **false**) If TRUE, include all presets, not only allowed combinations @@ -1131,6 +1133,7 @@ Neos.Neos:BreadcrumbMenuItems Create a list of of menu-items for the breadcrumb (ancestor documents). +:node: (Node) The current node to render the menu for. Defaults to ``documentNode`` from the fusion context :maximumLevels: (integer) Restrict the maximum depth of items in the menu, defaults to ``0`` :renderHiddenInIndex: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to ``false``. :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` @@ -1160,7 +1163,7 @@ If no node variant exists for the preset combination, a ``NULL`` node will be in Each ``item`` has the following properties: -:node: (Node) A node instance (with resolved shortcuts) that should be used to link to the item +:node: (Node) The current node used to calculate the Menu. Defaults to ``documentNode`` from the fusion context :state: (string) Menu state of the item: ``normal``, ``current`` (the current node), ``absent`` :label: (string) Label of the item (the dimension preset label) :menuLevel: (integer) Menu level the item is rendered on diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion index 849b72eb293..0da25707ac1 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion @@ -1,6 +1,10 @@ # Neos.Neos:BreadcrumbMenu provides a breadcrumb navigation based on menu items. # prototype(Neos.Neos:BreadcrumbMenu) < prototype(Neos.Fusion:Component) { + + # (Node) The current node to render the menu for. Defaults to ``documentNode`` from the fusion context + node = ${documentNode} + # html attributes for the rendered list attributes = Neos.Fusion:DataStructure @@ -15,6 +19,7 @@ prototype(Neos.Neos:BreadcrumbMenu) < prototype(Neos.Fusion:Component) { @private { items = Neos.Neos:BreadcrumbMenuItems { + node = ${props.node} maximumLevels = ${props.maximumLevels} renderHiddenInIndex = ${props.renderHiddenInIndex} calculateItemStates = ${props.calculateItemStates} diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion index eb9325251c2..8b128ba4eb8 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion @@ -1,4 +1,8 @@ prototype(Neos.Neos:BreadcrumbMenuItems) < prototype(Neos.Fusion:Component) { + + # (Node) The current node to render the menu for. Defaults to ``documentNode`` from the fusion context + node = ${documentNode} + # (integer) Restrict the maximum depth of items in the menu, defaults to ``0`` maximumLevels = 0 @@ -10,6 +14,7 @@ prototype(Neos.Neos:BreadcrumbMenuItems) < prototype(Neos.Fusion:Component) { renderer = Neos.Fusion:Value { parentItems = Neos.Neos:MenuItems { + node = ${props.node} calculateItemStates = ${props.calculateItemStates} renderHiddenInIndex = ${props.renderHiddenInIndex} maximumLevels = ${props.maximumLevels} @@ -17,6 +22,7 @@ prototype(Neos.Neos:BreadcrumbMenuItems) < prototype(Neos.Fusion:Component) { } currentItem = Neos.Neos:MenuItems { + node = ${props.node} calculateItemStates = ${props.calculateItemStates} renderHiddenInIndex = true maximumLevels = ${props.maximumLevels} diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion index 2f9e13ee42c..d5a75fb9ff6 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion @@ -1,5 +1,8 @@ # Neos.Neos:DimensionsMenu provides dimension (e.g. language) menu rendering prototype(Neos.Neos:DimensionsMenu) < prototype(Neos.Fusion:Component) { + # (Node) The current node to render the menu for. Defaults to ``documentNode`` from the fusion context + node = ${documentNode} + # html attributes for the rendered list attributes = Neos.Fusion:DataStructure @@ -18,9 +21,9 @@ prototype(Neos.Neos:DimensionsMenu) < prototype(Neos.Fusion:Component) { # (boolean) activate the *expensive* calculation of item states defaults to ``false`` calculateItemStates = false - @private { items = Neos.Neos:DimensionsMenuItems { + node = ${props.node} renderHiddenInIndex = ${props.renderHiddenInIndex} dimension = ${props.dimension} presets = ${props.presets} diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion index 783a193e9b3..55629907ada 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion @@ -1,6 +1,9 @@ prototype(Neos.Neos:DimensionsMenuItems) { @class = 'Neos\\Neos\\Fusion\\DimensionsMenuItemsImplementation' + # (Node) The current node. Defaults to ``node`` from the fusion context + node = ${documentNode} + # (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-index" renderHiddenInIndex = true diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion index a2e4eef00ab..c435eb45e3c 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion @@ -4,8 +4,8 @@ prototype(Neos.Neos:Menu) < prototype(Neos.Fusion:Component) { # html attributes for the rendered list attributes = Neos.Fusion:DataStructure - # (Node) The current node used to calculate the itemStates, and ``startingPoint`` (if not defined explicitly). Defaults to ``node`` from the fusion context - node = ${node} + # (Node) The current node used to calculate the itemStates, and ``startingPoint`` (if not defined explicitly). Defaults to ``documentNode`` from the fusion context + node = ${documentNode} # (integer) Define the startingPoint of the menu relatively. Non negative values specify this as n levels below root. Negative values are n steps up from ``node`` or ``startingPoint`` if defined. Defaults to ``1`` if no ``startingPoint`` is set otherwise ``0`` entryLevel = ${this.startingPoint ? 0 : 1} diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion index 2ee88194383..edf6bc37c60 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion @@ -1,8 +1,8 @@ prototype(Neos.Neos:MenuItems) { @class = 'Neos\\Neos\\Fusion\\MenuItemsImplementation' - # (Node) The current node used to calculate the itemStates, and ``startingPoint`` (if not defined explicitly). Defaults to ``node`` from the fusion context - node = ${node} + # (Node) The current node used to calculate the itemStates, and ``startingPoint`` (if not defined explicitly). Defaults to ``documentNode`` from the fusion context + node = ${documentNode} # (integer) Define the startingPoint of the menu relatively. Non negative values specify this as n levels below root. Negative values are n steps up from ``node`` or ``startingPoint`` if defined. Defaults to ``1`` if no ``startingPoint`` is set otherwise ``0`` entryLevel = ${this.startingPoint ? 0 : 1} From 7edbbdcfea4b46f733dce687dc9aff8946c563bd Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Wed, 1 Nov 2023 17:12:13 +0100 Subject: [PATCH 49/53] TASK: Cleanup usage of `NodeTypeConstraintsWithSubNodeTypes` --- .../Feature/Common/ConstraintChecks.php | 20 +++--- .../Classes/NodeType/ConstraintCheck.php | 16 +++-- .../Classes/NodeType/NodeType.php | 2 +- .../Classes/NodeType/NodeTypeManager.php | 2 +- .../NodeTypeConstraintsWithSubNodeTypes.php | 62 ------------------- 5 files changed, 23 insertions(+), 79 deletions(-) diff --git a/Neos.ContentRepository.Core/Classes/Feature/Common/ConstraintChecks.php b/Neos.ContentRepository.Core/Classes/Feature/Common/ConstraintChecks.php index 7397fbf44f4..0980ba6be62 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/Common/ConstraintChecks.php +++ b/Neos.ContentRepository.Core/Classes/Feature/Common/ConstraintChecks.php @@ -18,6 +18,7 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePointSet; use Neos\ContentRepository\Core\DimensionSpace\Exception\DimensionSpacePointNotFound; +use Neos\ContentRepository\Core\NodeType\ConstraintCheck; use Neos\ContentRepository\Core\SharedModel\Exception\RootNodeAggregateDoesNotExist; use Neos\ContentRepository\Core\SharedModel\Exception\ContentStreamDoesNotExistYet; use Neos\ContentRepository\Core\SharedModel\Exception\DimensionSpacePointIsNotYetOccupied; @@ -216,18 +217,15 @@ protected function requireNodeTypeToAllowNodesOfTypeInReference( if (is_null($propertyDeclaration)) { throw ReferenceCannotBeSet::becauseTheNodeTypeDoesNotDeclareIt($referenceName, $nodeTypeName); } - if (isset($propertyDeclaration['constraints']['nodeTypes'])) { - $nodeTypeConstraints = NodeTypeConstraintsWithSubNodeTypes::createFromNodeTypeDeclaration( - $propertyDeclaration['constraints']['nodeTypes'], - $this->getNodeTypeManager() + + $constraints = $propertyDeclaration['constraints']['nodeTypes'] ?? []; + + if (!ConstraintCheck::create($constraints)->isNodeTypeAllowed($nodeType)) { + throw ReferenceCannotBeSet::becauseTheConstraintsAreNotMatched( + $referenceName, + $nodeTypeName, + $nodeTypeNameInQuestion ); - if (!$nodeTypeConstraints->matches($nodeTypeNameInQuestion)) { - throw ReferenceCannotBeSet::becauseTheConstraintsAreNotMatched( - $referenceName, - $nodeTypeName, - $nodeTypeNameInQuestion - ); - } } } diff --git a/Neos.ContentRepository.Core/Classes/NodeType/ConstraintCheck.php b/Neos.ContentRepository.Core/Classes/NodeType/ConstraintCheck.php index 91058e9b8b8..3771b1234d7 100644 --- a/Neos.ContentRepository.Core/Classes/NodeType/ConstraintCheck.php +++ b/Neos.ContentRepository.Core/Classes/NodeType/ConstraintCheck.php @@ -6,16 +6,24 @@ * Performs node type constraint checks against a given set of constraints * @internal */ -class ConstraintCheck +final readonly class ConstraintCheck { /** - * @param array<string,mixed> $constraints + * @param array<string,bool> $constraints */ - public function __construct( - private readonly array $constraints + private function __construct( + private array $constraints ) { } + /** + * @param array<string,bool> $constraints + */ + public static function create(array $constraints): self + { + return new self($constraints); + } + public function isNodeTypeAllowed(NodeType $nodeType): bool { $directConstraintsResult = $this->isNodeTypeAllowedByDirectConstraints($nodeType); diff --git a/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php b/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php index 1eaae89553c..bdc910dfcb7 100644 --- a/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php +++ b/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php @@ -479,7 +479,7 @@ public function getNodeTypeNameOfTetheredNode(NodeName $nodeName): NodeTypeName public function allowsChildNodeType(NodeType $nodeType): bool { $constraints = $this->getConfiguration('constraints.nodeTypes') ?: []; - return (new ConstraintCheck($constraints))->isNodeTypeAllowed($nodeType); + return ConstraintCheck::create($constraints)->isNodeTypeAllowed($nodeType); } /** diff --git a/Neos.ContentRepository.Core/Classes/NodeType/NodeTypeManager.php b/Neos.ContentRepository.Core/Classes/NodeType/NodeTypeManager.php index ba6ec1cfd8e..69352cb5da3 100644 --- a/Neos.ContentRepository.Core/Classes/NodeType/NodeTypeManager.php +++ b/Neos.ContentRepository.Core/Classes/NodeType/NodeTypeManager.php @@ -260,7 +260,7 @@ public function isNodeTypeAllowedAsChildToTetheredNode(NodeType $parentNodeType, $constraints = Arrays::arrayMergeRecursiveOverrule($constraints, $childNodeConstraintConfiguration); - return (new ConstraintCheck($constraints))->isNodeTypeAllowed($nodeType); + return ConstraintCheck::create($constraints)->isNodeTypeAllowed($nodeType); } /** diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/NodeTypeConstraintsWithSubNodeTypes.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/NodeTypeConstraintsWithSubNodeTypes.php index ec6300d2f31..fbfc380532c 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/NodeTypeConstraintsWithSubNodeTypes.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/NodeTypeConstraintsWithSubNodeTypes.php @@ -33,50 +33,6 @@ private function __construct( ) { } - /** - * @param array<string,bool> $nodeTypeDeclaration - */ - public static function createFromNodeTypeDeclaration( - array $nodeTypeDeclaration, - NodeTypeManager $nodeTypeManager - ): self { - $wildCardAllowed = false; - $explicitlyAllowedNodeTypeNames = []; - $explicitlyDisallowedNodeTypeNames = []; - foreach ($nodeTypeDeclaration as $constraintName => $allowed) { - if ($constraintName === '*') { - $wildCardAllowed = $allowed; - } else { - if ($allowed) { - $explicitlyAllowedNodeTypeNames[] = $constraintName; - } else { - $explicitlyDisallowedNodeTypeNames[] = $constraintName; - } - } - } - - return new self( - $wildCardAllowed, - self::expandByIncludingSubNodeTypes( - NodeTypeNames::fromStringArray($explicitlyAllowedNodeTypeNames), - $nodeTypeManager - ), - self::expandByIncludingSubNodeTypes( - NodeTypeNames::fromStringArray($explicitlyDisallowedNodeTypeNames), - $nodeTypeManager - ) - ); - } - - public static function allowAll(): self - { - return new self( - true, - NodeTypeNames::createEmpty(), - NodeTypeNames::createEmpty(), - ); - } - public static function create(NodeTypeConstraints $nodeTypeConstraints, NodeTypeManager $nodeTypeManager): self { // in case there are no filters, we fall back to allowing every node type. @@ -137,22 +93,4 @@ public function matches(NodeTypeName $nodeTypeName): bool // otherwise, we return $wildcardAllowed. return $this->isWildCardAllowed; } - - public function toFilterString(): string - { - $parts = []; - if ($this->isWildCardAllowed) { - $parts[] = '*'; - } - - foreach ($this->explicitlyDisallowedNodeTypeNames as $nodeTypeName) { - $parts[] = '!' . $nodeTypeName->value; - } - - foreach ($this->explicitlyAllowedNodeTypeNames as $nodeTypeName) { - $parts[] = $nodeTypeName->value; - } - - return implode(',', $parts); - } } From 4c12b4c6c58187afeda125fc772a22ea372b545d Mon Sep 17 00:00:00 2001 From: Manuel Meister <news.manuelsworld@gmail.com> Date: Thu, 2 Nov 2023 12:13:21 +0100 Subject: [PATCH 50/53] BUGFIX: broken references in NeosFusionReference.rst Neos.Fusion:Tag and Neos.Fusion:DataStructure references were broken, as well as some other minor typos. --- Neos.Neos/Documentation/References/NeosFusionReference.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Neos.Neos/Documentation/References/NeosFusionReference.rst b/Neos.Neos/Documentation/References/NeosFusionReference.rst index d9bcffe89b4..4a163e6d179 100644 --- a/Neos.Neos/Documentation/References/NeosFusionReference.rst +++ b/Neos.Neos/Documentation/References/NeosFusionReference.rst @@ -474,7 +474,7 @@ Example:: value = ${1+2} } -.. _Neos_Fusion__Tag: +.. _Neos_Fusion__DataStructure: Neos.Fusion:DataStructure @@ -694,7 +694,7 @@ Neos.Fusion:Link.Resource Renders a link pointing to a resource :content: (string) content of the link tag -:href: (string, default :ref:`Neos_Fusion__ResouceUri`) The href for the link tag +:href: (string, default :ref:`Neos_Fusion__ResourceUri`) The href for the link tag :[key]: (string) Other attributes for the link tag Example:: @@ -1038,7 +1038,7 @@ The following fusion properties are passed over to :ref:`Neos_Neos__DimensionsMe :renderHiddenInIndex: (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-index" :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` -.. note:: The ``items`` of the ``DimensionsMenu`` are internally calculated with the prototype :ref:`Neos_Neos__DimensionsMenuMenuItems` which +.. note:: The ``items`` of the ``DimensionsMenu`` are internally calculated with the prototype :ref:`Neos_Neos__DimensionsMenuItems` which you can use directly aswell. .. note:: The ``rendering`` of the ``DimensionsMenu`` is performed with the prototype :ref:`Neos_Neos__MenuItemListRenderer`. From 9515cbd1965ddd0b3824478a5c01793d217443ba Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Thu, 2 Nov 2023 14:49:24 +0100 Subject: [PATCH 51/53] TASK: 2nd. Fixup for pr #4641 ContentCollection.feature --- .../Tests/Behavior/Features/Bootstrap/FusionTrait.php | 7 ++++++- .../Behavior/Features/Fusion/ContentCollection.feature | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Neos.Neos/Tests/Behavior/Features/Bootstrap/FusionTrait.php b/Neos.Neos/Tests/Behavior/Features/Bootstrap/FusionTrait.php index ecd35ee994b..705edc8cab2 100644 --- a/Neos.Neos/Tests/Behavior/Features/Bootstrap/FusionTrait.php +++ b/Neos.Neos/Tests/Behavior/Features/Bootstrap/FusionTrait.php @@ -26,6 +26,7 @@ use Neos\Fusion\Core\FusionSourceCodeCollection; use Neos\Fusion\Core\Parser; use Neos\Fusion\Core\RuntimeFactory; +use Neos\Fusion\Exception\RuntimeException; use Neos\Neos\Domain\Service\ContentContext; use Neos\Neos\Routing\RequestUriHostMiddleware; use PHPUnit\Framework\Assert; @@ -131,7 +132,11 @@ public function iExecuteTheFollowingFusionCode(PyStringNode $fusionCode, string try { $this->renderingResult = $fusionRuntime->render($path); } catch (\Throwable $exception) { - $this->lastRenderingException = $exception; + if ($exception instanceof RuntimeException) { + $this->lastRenderingException = $exception->getPrevious(); + } else { + $this->lastRenderingException = $exception; + } } $fusionRuntime->popContext(); } diff --git a/Neos.Neos/Tests/Behavior/Features/Fusion/ContentCollection.feature b/Neos.Neos/Tests/Behavior/Features/Fusion/ContentCollection.feature index edadc686621..1a714d47815 100644 --- a/Neos.Neos/Tests/Behavior/Features/Fusion/ContentCollection.feature +++ b/Neos.Neos/Tests/Behavior/Features/Fusion/ContentCollection.feature @@ -33,7 +33,9 @@ Feature: Tests for the "Neos.Neos:ContentCollection" Fusion prototype include: resource://Neos.Fusion/Private/Fusion/Root.fusion include: resource://Neos.Neos/Private/Fusion/Root.fusion - test = Neos.Neos:ContentCollection + test = Neos.Neos:ContentCollection { + @exceptionHandler = 'Neos\\Fusion\\Core\\ExceptionHandlers\\ThrowingHandler' + } """ Then I expect the following Fusion rendering error: """ @@ -48,6 +50,7 @@ Feature: Tests for the "Neos.Neos:ContentCollection" Fusion prototype test = Neos.Neos:ContentCollection { nodePath = 'invalid' + @exceptionHandler = 'Neos\\Fusion\\Core\\ExceptionHandlers\\ThrowingHandler' } """ Then I expect the following Fusion rendering error: From ed59a52418509f2e5fba456237d462c410c01c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Mu=CC=88ller?= <christian@flownative.com> Date: Thu, 2 Nov 2023 15:44:36 +0100 Subject: [PATCH 52/53] TASK: Remove CliSetup from development collection This allows users to use the new neos/setup package in the future as otherwise a conflict with CliSetup would occur with composer. Relates: #4243 --- .../Command/SetupCommandController.php | 195 ----- .../Command/WelcomeCommandController.php | 68 -- Neos.CliSetup/Classes/Exception.php | 19 - .../Database/DatabaseConnectionService.php | 121 ---- .../ImageHandler/ImageHandlerService.php | 78 -- Neos.CliSetup/Configuration/Settings.yaml | 24 - Neos.CliSetup/LICENSE | 675 ------------------ Neos.CliSetup/Readme.rst | 20 - Neos.CliSetup/composer.json | 17 - composer.json | 4 - 10 files changed, 1221 deletions(-) delete mode 100644 Neos.CliSetup/Classes/Command/SetupCommandController.php delete mode 100644 Neos.CliSetup/Classes/Command/WelcomeCommandController.php delete mode 100644 Neos.CliSetup/Classes/Exception.php delete mode 100644 Neos.CliSetup/Classes/Infrastructure/Database/DatabaseConnectionService.php delete mode 100644 Neos.CliSetup/Classes/Infrastructure/ImageHandler/ImageHandlerService.php delete mode 100644 Neos.CliSetup/Configuration/Settings.yaml delete mode 100644 Neos.CliSetup/LICENSE delete mode 100644 Neos.CliSetup/Readme.rst delete mode 100644 Neos.CliSetup/composer.json diff --git a/Neos.CliSetup/Classes/Command/SetupCommandController.php b/Neos.CliSetup/Classes/Command/SetupCommandController.php deleted file mode 100644 index 2bf87c00d1e..00000000000 --- a/Neos.CliSetup/Classes/Command/SetupCommandController.php +++ /dev/null @@ -1,195 +0,0 @@ -<?php -declare(strict_types=1); - -namespace Neos\CliSetup\Command; - -/* - * This file is part of the Neos.CliSetup package. - * - * (c) Contributors of the Neos Project - www.neos.io - * - * This package is Open Source Software. For the full copyright and license - * information, please view the LICENSE file which was distributed with this - * source code. - */ - -use Neos\Flow\Annotations as Flow; -use Neos\Flow\Cli\CommandController; -use Neos\Utility\Arrays; -use Neos\CliSetup\Exception as SetupException; -use Neos\CliSetup\Infrastructure\Database\DatabaseConnectionService; -use Neos\CliSetup\Infrastructure\ImageHandler\ImageHandlerService; -use Symfony\Component\Yaml\Yaml; - -/** - * @Flow\Scope("singleton") - */ -class SetupCommandController extends CommandController -{ - - /** - * @var DatabaseConnectionService - * @Flow\Inject - */ - protected $databaseConnectionService; - - /** - * @var array - * @Flow\InjectConfiguration(package="Neos.Flow", path="persistence.backendOptions") - */ - protected $persistenceConfiguration; - - /** - * @var ImageHandlerService - * @Flow\Inject - */ - protected $imageHandlerService; - - /** - * @var string - * @Flow\InjectConfiguration(package="Neos.Imagine", path="driver") - */ - protected $imagineDriver; - - /** - * Configure the database connection for flow persistence - * - * @param string|null $driver Driver - * @param string|null $host Hostname or IP - * @param string|null $dbname Database name - * @param string|null $user Username - * @param string|null $password Password - */ - public function databaseCommand(?string $driver = null, ?string $host = null, ?string $dbname = null, ?string $user = null, ?string $password = null): void - { - $availableDrivers = $this->databaseConnectionService->getAvailableDrivers(); - if (count($availableDrivers) == 0) { - $this->outputLine('No supported database driver found'); - $this->quit(1); - } - - if (is_null($driver)) { - $driver = $this->output->select( - sprintf('DB Driver (<info>%s</info>): ', $this->persistenceConfiguration['driver'] ?? '---'), - $availableDrivers, - $this->persistenceConfiguration['driver'] - ); - } - - if (is_null($host)) { - $host = $this->output->ask( - sprintf('Host (<info>%s</info>): ', $this->persistenceConfiguration['host'] ?? '127.0.0.1'), - $this->persistenceConfiguration['host'] ?? '127.0.0.1' - ); - } - - if (is_null($dbname)) { - $dbname = $this->output->ask( - sprintf('Database (<info>%s</info>): ', $this->persistenceConfiguration['dbname'] ?? '---'), - $this->persistenceConfiguration['dbname'] - ); - } - - if (is_null($user)) { - $user = $this->output->ask( - sprintf('Username (<info>%s</info>): ', $this->persistenceConfiguration['user'] ?? '---'), - $this->persistenceConfiguration['user'] - ); - } - - if (is_null($password)) { - $password = $this->output->ask( - sprintf('Password (<info>%s</info>): ', $this->persistenceConfiguration['password'] ?? '---'), - $this->persistenceConfiguration['password'] - ); - } - - $persistenceConfiguration = [ - 'driver' => $driver, - 'host' => $host, - 'dbname' => $dbname, - 'user' => $user, - 'password' => $password - ]; - - // postgres does not know utf8mb4 - if ($driver == 'pdo_pgsql') { - $persistenceConfiguration['charset'] = 'utf8'; - $persistenceConfiguration['defaultTableOptions']['charset'] = 'utf8'; - } - - $this->outputLine(); - - try { - $this->databaseConnectionService->verifyDatabaseConnectionWorks($persistenceConfiguration); - $this->outputLine(sprintf('Database <info>%s</info> was connected sucessfully.', $persistenceConfiguration['dbname'])); - } catch (SetupException $exception) { - try { - $this->databaseConnectionService->createDatabaseAndVerifyDatabaseConnectionWorks($persistenceConfiguration); - $this->outputLine(sprintf('Database <info>%s</info> was sucessfully created.', $persistenceConfiguration['dbname'])); - } catch (SetupException $exception) { - $this->outputLine(sprintf( - 'Database <info>%s</info> could not be created. Please check the permissions for user <info>%s</info>. Exception: <info>%s</info>', - $persistenceConfiguration['dbname'], - $persistenceConfiguration['user'], - $exception->getMessage() - )); - $this->quit(1); - } - } - - $filename = 'Configuration/Settings.Database.yaml'; - - $this->outputLine(); - $this->output(sprintf('<info>%s</info>',$this->writeSettings($filename, 'Neos.Flow.persistence.backendOptions',$persistenceConfiguration))); - $this->outputLine(); - $this->outputLine(sprintf('The new database settings were written to <info>%s</info>', $filename)); - } - - /** - * @param string|null $driver - */ - public function imageHandlerCommand(string $driver = null): void - { - $availableImageHandlers = $this->imageHandlerService->getAvailableImageHandlers(); - - if (count($availableImageHandlers) == 0) { - $this->outputLine('No supported image handler found.'); - $this->quit(1); - } - - if (is_null($driver)) { - $driver = $this->output->select( - sprintf('Select Image Handler (<info>%s</info>): ', array_key_last($availableImageHandlers)), - $availableImageHandlers, - array_key_last($availableImageHandlers) - ); - } - - $filename = 'Configuration/Settings.Imagehandling.yaml'; - $this->outputLine(); - $this->output(sprintf('<info>%s</info>', $this->writeSettings($filename, 'Neos.Imagine.driver', $driver))); - $this->outputLine(); - $this->outputLine(sprintf('The new image handler setting were written to <info>%s</info>', $filename)); - } - - /** - * Write the settings to the given path, existing configuration files are created or modified - * - * @param string $filename The filename the settings are stored in - * @param string $path The configuration path - * @param mixed $settings The actual settings to write - * @return string The added yaml code - */ - protected function writeSettings(string $filename, string $path, $settings): string - { - if (file_exists($filename)) { - $previousSettings = Yaml::parseFile($filename); - } else { - $previousSettings = []; - } - $newSettings = Arrays::setValueByPath($previousSettings,$path, $settings); - file_put_contents($filename, YAML::dump($newSettings, 10, 2)); - return YAML::dump(Arrays::setValueByPath([],$path, $settings), 10, 2); - } -} diff --git a/Neos.CliSetup/Classes/Command/WelcomeCommandController.php b/Neos.CliSetup/Classes/Command/WelcomeCommandController.php deleted file mode 100644 index 292a8885ec3..00000000000 --- a/Neos.CliSetup/Classes/Command/WelcomeCommandController.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Neos\CliSetup\Command; - -/* - * This file is part of the Neos.CliSetup package. - * - * (c) Contributors of the Neos Project - www.neos.io - * - * This package is Open Source Software. For the full copyright and license - * information, please view the LICENSE file which was distributed with this - * source code. - */ - -use Neos\Flow\Annotations as Flow; -use Neos\Flow\Cli\CommandController; - -/** - * @Flow\Scope("singleton") - */ -class WelcomeCommandController extends CommandController -{ - - public function indexCommand(): void - { - $this->output( - <<<EOT - <info> - ....###### .###### - .....####### ...###### - .......####### ....###### - .........####### ....###### - ....#......#######...###### - ....##.......#######.###### - ....#####......############ - ....##### ......########## - ....##### ......######## - ....##### ......###### - .####### ........ - - Welcome to Neos. - </info> - - The following steps will help you to configure Neos: - - 1. Configure the database connection: - <info>./flow setup:database</info> - 2. Create the required database tables: - <info>./flow doctrine:migrate</info> - 3. Configure the image handler: - <info>./flow setup:imagehandler</info> - 4. Create an admin user: - <info>./flow user:create --roles Administrator username password firstname lastname </info> - 5. Create your own site package or require an existing one (choose one option): - - <info>./flow kickstart:site Vendor.Site</info> - - <info>composer require neos/demo && ./flow flow:package:rescan</info> - 6. Import a site or create an empty one (choose one option): - - <info>./flow site:import Neos.Demo</info> - - <info>./flow site:import Vendor.Site</info> - - <info>./flow site:create sitename Vendor.Site Vendor.Site:Document.HomePage</info> - - EOT - ); - } - -} diff --git a/Neos.CliSetup/Classes/Exception.php b/Neos.CliSetup/Classes/Exception.php deleted file mode 100644 index e792dc7c6cd..00000000000 --- a/Neos.CliSetup/Classes/Exception.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -namespace Neos\CliSetup; - -/* - * This file is part of the Neos.CliSetup package. - * - * (c) Contributors of the Neos Project - www.neos.io - * - * This package is Open Source Software. For the full copyright and license - * information, please view the LICENSE file which was distributed with this - * source code. - */ - -/** - * A generic Setup Exception - */ -class Exception extends \Neos\Flow\Exception -{ -} diff --git a/Neos.CliSetup/Classes/Infrastructure/Database/DatabaseConnectionService.php b/Neos.CliSetup/Classes/Infrastructure/Database/DatabaseConnectionService.php deleted file mode 100644 index c7a34869c73..00000000000 --- a/Neos.CliSetup/Classes/Infrastructure/Database/DatabaseConnectionService.php +++ /dev/null @@ -1,121 +0,0 @@ -<?php -declare(strict_types=1); - -namespace Neos\CliSetup\Infrastructure\Database; - -/* - * This file is part of the Neos.CliSetup package. - * - * (c) Contributors of the Neos Project - www.neos.io - * - * This package is Open Source Software. For the full copyright and license - * information, please view the LICENSE file which was distributed with this - * source code. - */ - -use Neos\Flow\Annotations as Flow; -use Doctrine\DBAL\DriverManager; -use Doctrine\DBAL\Platforms\MySqlPlatform; -use Doctrine\DBAL\Platforms\PostgreSqlPlatform; -use Neos\CliSetup\Exception as SetupException; -use Doctrine\DBAL\Exception as DBALException; - -class DatabaseConnectionService -{ - - /** - * @Flow\InjectConfiguration(path="supportedDatabaseDrivers") - * @var array<string, string> - */ - protected $supportedDatabaseDrivers; - - /** - * Return an array with the available database drivers - * - * @return array<string,string> - */ - public function getAvailableDrivers(): array - { - $availableDrivers = []; - foreach ($this->supportedDatabaseDrivers as $driver => $description) { - if (extension_loaded($driver)) { - $availableDrivers[$driver] = $description; - } - } - return $availableDrivers; - } - - /** - * Verify the database connection settings - * - * @param array $connectionSettings - * @throws SetupException - */ - public function verifyDatabaseConnectionWorks(array $connectionSettings) - { - try { - $this->connectToDatabase($connectionSettings); - } catch (DBALException | \PDOException $exception) { - throw new SetupException(sprintf('Could not connect to database "%s". Please check the permissions for user "%s". DBAL Exception: "%s"', $connectionSettings['dbname'], $connectionSettings['user'], $exception->getMessage()), 1351000864); - } - } - - /** - * Create a database with the connection settings and verify the connection - * - * @param array $connectionSettings - * @throws SetupException - */ - public function createDatabaseAndVerifyDatabaseConnectionWorks(array $connectionSettings) - { - try { - $this->createDatabase($connectionSettings, $connectionSettings['dbname']); - } catch (DBALException | \PDOException $exception) { - throw new SetupException(sprintf('Database "%s" could not be created. Please check the permissions for user "%s". DBAL Exception: "%s"', $connectionSettings['dbname'], $connectionSettings['user'], $exception->getMessage()), 1351000841, $exception); - } - try { - $this->connectToDatabase($connectionSettings); - } catch (DBALException | \PDOException $exception) { - throw new SetupException(sprintf('Could not connect to database "%s". Please check the permissions for user "%s". DBAL Exception: "%s"', $connectionSettings['dbname'], $connectionSettings['user'], $exception->getMessage()), 1351000864); - } - } - - /** - * Tries to connect to the database using the specified $connectionSettings - * - * @param array $connectionSettings array in the format array('user' => 'dbuser', 'password' => 'dbpassword', 'host' => 'dbhost', 'dbname' => 'dbname') - * @return void - * @throws \Doctrine\DBAL\Exception | \PDOException if the connection fails - */ - protected function connectToDatabase(array $connectionSettings) - { - $connection = DriverManager::getConnection($connectionSettings); - $connection->connect(); - } - - /** - * Connects to the database using the specified $connectionSettings - * and tries to create a database named $databaseName. - * - * @param array $connectionSettings array in the format array('user' => 'dbuser', 'password' => 'dbpassword', 'host' => 'dbhost', 'dbname' => 'dbname') - * @param string $databaseName name of the database to create - * @throws \Neos\Setup\Exception - * @return void - */ - protected function createDatabase(array $connectionSettings, $databaseName) - { - unset($connectionSettings['dbname']); - $connection = DriverManager::getConnection($connectionSettings); - $databasePlatform = $connection->getSchemaManager()->getDatabasePlatform(); - $databaseName = $databasePlatform->quoteIdentifier($databaseName); - // we are not using $databasePlatform->getCreateDatabaseSQL() below since we want to specify charset and collation - if ($databasePlatform instanceof MySqlPlatform) { - $connection->executeUpdate(sprintf('CREATE DATABASE %s CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci', $databaseName)); - } elseif ($databasePlatform instanceof PostgreSqlPlatform) { - $connection->executeUpdate(sprintf('CREATE DATABASE %s WITH ENCODING = %s', $databaseName, "'UTF8'")); - } else { - throw new SetupException(sprintf('The given database platform "%s" is not supported.', $databasePlatform->getName()), 1386454885); - } - $connection->close(); - } -} diff --git a/Neos.CliSetup/Classes/Infrastructure/ImageHandler/ImageHandlerService.php b/Neos.CliSetup/Classes/Infrastructure/ImageHandler/ImageHandlerService.php deleted file mode 100644 index cc4cb6ec69f..00000000000 --- a/Neos.CliSetup/Classes/Infrastructure/ImageHandler/ImageHandlerService.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php -declare(strict_types=1); - -namespace Neos\CliSetup\Infrastructure\ImageHandler; - -/* - * This file is part of the Neos.CliSetup package. - * - * (c) Contributors of the Neos Project - www.neos.io - * - * This package is Open Source Software. For the full copyright and license - * information, please view the LICENSE file which was distributed with this - * source code. - */ - -use Neos\Flow\Annotations as Flow; -use Neos\Imagine\ImagineFactory; - -class ImageHandlerService -{ - - /** - * @Flow\InjectConfiguration(path="supportedImageHandlers") - * @var string[] - */ - protected $supportedImageHandlers; - - /** - * @Flow\InjectConfiguration(path="requiredImageFormats") - * @var string[] - */ - protected $requiredImageFormats; - - /** - * @Flow\Inject - * @var ImagineFactory - */ - protected $imagineFactory; - - /** - * Return all Imagine drivers that support the loading of the required images - * - * @return array<string,string> - */ - public function getAvailableImageHandlers(): array - { - $availableImageHandlers = []; - foreach ($this->supportedImageHandlers as $driverName => $description) { - if (\extension_loaded(strtolower($driverName))) { - $unsupportedFormats = $this->findUnsupportedImageFormats($driverName); - if (\count($unsupportedFormats) === 0) { - $availableImageHandlers[$driverName] = $description; - } - } - } - return $availableImageHandlers; - } - - /** - * @param string $driver - * @return array Not supported image formats - */ - protected function findUnsupportedImageFormats(string $driver): array - { - $this->imagineFactory->injectSettings(['driver' => ucfirst($driver)]); - $imagine = $this->imagineFactory->create(); - $unsupportedFormats = []; - - foreach ($this->requiredImageFormats as $imageFormat => $testFile) { - try { - $imagine->load(file_get_contents($testFile)); - } /** @noinspection BadExceptionsProcessingInspection */ catch (\Exception $exception) { - $unsupportedFormats[] = $imageFormat; - } - } - return $unsupportedFormats; - } -} diff --git a/Neos.CliSetup/Configuration/Settings.yaml b/Neos.CliSetup/Configuration/Settings.yaml deleted file mode 100644 index a98508ce232..00000000000 --- a/Neos.CliSetup/Configuration/Settings.yaml +++ /dev/null @@ -1,24 +0,0 @@ -Neos: - CliSetup: - # - # Imagine drivers that are supported - # - supportedImageHandlers: - 'Gd': 'GD Library - generally slow, not recommended in production' - 'Gmagick': 'Gmagick php module' - 'Imagick': 'ImageMagick php module' - 'Vips': 'Vips php module - fast and memory efficient, needs rokka/imagine-vips' - # - # Images to verify that the format can be handled - # - requiredImageFormats: - 'jpg': 'resource://Neos.Neos/Private/Installer/TestImages/Test.jpg' - 'gif': 'resource://Neos.Neos/Private/Installer/TestImages/Test.gif' - 'png': 'resource://Neos.Neos/Private/Installer/TestImages/Test.png' - # - # The database drivers that are supported by migrations - # - supportedDatabaseDrivers: - 'pdo_mysql': 'MySQL/MariaDB via PDO' - 'mysqli': 'MySQL/MariaDB via mysqli' - 'pdo_pgsql': 'PostgreSQL via PDO' diff --git a/Neos.CliSetup/LICENSE b/Neos.CliSetup/LICENSE deleted file mode 100644 index 10926e87f11..00000000000 --- a/Neos.CliSetup/LICENSE +++ /dev/null @@ -1,675 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. - diff --git a/Neos.CliSetup/Readme.rst b/Neos.CliSetup/Readme.rst deleted file mode 100644 index 3f58184c434..00000000000 --- a/Neos.CliSetup/Readme.rst +++ /dev/null @@ -1,20 +0,0 @@ ----------------- -The Neos package ----------------- - -.. note:: This repository is a **read-only subsplit** of a package that is part of the - Neos project (learn more on `www.neos.io <https://www.neos.io/>`_). - -Neos is an open source Content Application Platform based on Flow. A set of -core Content Management features is resting within a larger context that allows -you to build a perfectly customized experience for your users. - -If you want to use Neos, please have a look at the `Neos documentation -<http://neos.readthedocs.org/en/stable/>`_ - -Contribute ----------- - -If you want to contribute to Neos, please have a look at -https://github.com/neos/neos-development-collection - it is the repository -used for development and all pull requests should go into it. diff --git a/Neos.CliSetup/composer.json b/Neos.CliSetup/composer.json deleted file mode 100644 index 1312eccac4e..00000000000 --- a/Neos.CliSetup/composer.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "neos/cli-setup", - "type": "neos-package", - "license": [ - "GPL-3.0-or-later" - ], - "description": "ClI setup for Neos CMS", - "require": { - "php": "^8.0", - "neos/neos": "self.version" - }, - "autoload": { - "psr-4": { - "Neos\\CliSetup\\": "Classes" - } - } -} diff --git a/composer.json b/composer.json index a68d3b1a4ce..9f9477f5973 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,6 @@ "typo3/neos": "self.version", "typo3/neos-nodetypes": "self.version", "typo3/neos-kickstarter": "self.version", - "neos/cli-setup": "self.version", "neos/content-repository": "self.version", "neos/diff": "self.version", "neos/fusion-afx": "self.version", @@ -66,9 +65,6 @@ }, "autoload": { "psr-4": { - "Neos\\CliSetup\\": [ - "Neos.CliSetup/Classes" - ], "Neos\\ContentRepository\\": [ "Neos.ContentRepository/Classes" ], From 478064b905989ec2968433b4e487515146dae553 Mon Sep 17 00:00:00 2001 From: Jenkins <jenkins@neos.io> Date: Thu, 2 Nov 2023 14:52:52 +0000 Subject: [PATCH 53/53] TASK: Update references [skip ci] --- Neos.Neos/Documentation/References/CommandReference.rst | 2 +- Neos.Neos/Documentation/References/EelHelpersReference.rst | 2 +- .../Documentation/References/FlowQueryOperationReference.rst | 2 +- .../Documentation/References/Signals/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/Signals/Flow.rst | 2 +- Neos.Neos/Documentation/References/Signals/Media.rst | 2 +- Neos.Neos/Documentation/References/Signals/Neos.rst | 2 +- Neos.Neos/Documentation/References/Validators/Flow.rst | 2 +- Neos.Neos/Documentation/References/Validators/Media.rst | 2 +- Neos.Neos/Documentation/References/Validators/Party.rst | 2 +- .../Documentation/References/ViewHelpers/ContentRepository.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Form.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Media.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Neos.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Neos.Neos/Documentation/References/CommandReference.rst b/Neos.Neos/Documentation/References/CommandReference.rst index 5e486ba7350..add3788133f 100644 --- a/Neos.Neos/Documentation/References/CommandReference.rst +++ b/Neos.Neos/Documentation/References/CommandReference.rst @@ -19,7 +19,7 @@ commands that may be available, use:: ./flow help -The following reference was automatically generated from code on 2023-11-01 +The following reference was automatically generated from code on 2023-11-02 .. _`Neos Command Reference: NEOS.CONTENTREPOSITORY`: diff --git a/Neos.Neos/Documentation/References/EelHelpersReference.rst b/Neos.Neos/Documentation/References/EelHelpersReference.rst index e285d1c8ccc..8886e500d60 100644 --- a/Neos.Neos/Documentation/References/EelHelpersReference.rst +++ b/Neos.Neos/Documentation/References/EelHelpersReference.rst @@ -3,7 +3,7 @@ Eel Helpers Reference ===================== -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`Eel Helpers Reference: Api`: diff --git a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst index 313561e3f2d..96b99085704 100644 --- a/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst +++ b/Neos.Neos/Documentation/References/FlowQueryOperationReference.rst @@ -3,7 +3,7 @@ FlowQuery Operation Reference ============================= -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`FlowQuery Operation Reference: add`: diff --git a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst index 62af6be6d29..1b7d15339ef 100644 --- a/Neos.Neos/Documentation/References/Signals/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/Signals/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository Signals Reference ==================================== -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`Content Repository Signals Reference: Context (``Neos\ContentRepository\Domain\Service\Context``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Flow.rst b/Neos.Neos/Documentation/References/Signals/Flow.rst index b0c21600b1c..0b39d27fdab 100644 --- a/Neos.Neos/Documentation/References/Signals/Flow.rst +++ b/Neos.Neos/Documentation/References/Signals/Flow.rst @@ -3,7 +3,7 @@ Flow Signals Reference ====================== -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`Flow Signals Reference: AbstractAdvice (``Neos\Flow\Aop\Advice\AbstractAdvice``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Media.rst b/Neos.Neos/Documentation/References/Signals/Media.rst index c85d2749301..e5f473b8be1 100644 --- a/Neos.Neos/Documentation/References/Signals/Media.rst +++ b/Neos.Neos/Documentation/References/Signals/Media.rst @@ -3,7 +3,7 @@ Media Signals Reference ======================= -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`Media Signals Reference: AssetCollectionController (``Neos\Media\Browser\Controller\AssetCollectionController``)`: diff --git a/Neos.Neos/Documentation/References/Signals/Neos.rst b/Neos.Neos/Documentation/References/Signals/Neos.rst index 2ebf0272945..f952ab20379 100644 --- a/Neos.Neos/Documentation/References/Signals/Neos.rst +++ b/Neos.Neos/Documentation/References/Signals/Neos.rst @@ -3,7 +3,7 @@ Neos Signals Reference ====================== -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`Neos Signals Reference: AbstractCreate (``Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate``)`: diff --git a/Neos.Neos/Documentation/References/Validators/Flow.rst b/Neos.Neos/Documentation/References/Validators/Flow.rst index 9a355dbd25f..e73cf096111 100644 --- a/Neos.Neos/Documentation/References/Validators/Flow.rst +++ b/Neos.Neos/Documentation/References/Validators/Flow.rst @@ -3,7 +3,7 @@ Flow Validator Reference ======================== -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`Flow Validator Reference: AggregateBoundaryValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Media.rst b/Neos.Neos/Documentation/References/Validators/Media.rst index 4ab02a7bfcf..f28c5731211 100644 --- a/Neos.Neos/Documentation/References/Validators/Media.rst +++ b/Neos.Neos/Documentation/References/Validators/Media.rst @@ -3,7 +3,7 @@ Media Validator Reference ========================= -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`Media Validator Reference: ImageOrientationValidator`: diff --git a/Neos.Neos/Documentation/References/Validators/Party.rst b/Neos.Neos/Documentation/References/Validators/Party.rst index 4a838dacc18..e1bdeafa022 100644 --- a/Neos.Neos/Documentation/References/Validators/Party.rst +++ b/Neos.Neos/Documentation/References/Validators/Party.rst @@ -3,7 +3,7 @@ Party Validator Reference ========================= -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`Party Validator Reference: AimAddressValidator`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst index 096af561261..e849736eab2 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst @@ -3,7 +3,7 @@ Content Repository ViewHelper Reference ####################################### -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`Content Repository ViewHelper Reference: PaginateViewHelper`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst index 8fd558f5957..e35eed82196 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst @@ -3,7 +3,7 @@ FluidAdaptor ViewHelper Reference ################################# -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`FluidAdaptor ViewHelper Reference: f:debug`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst index 31197ac31f0..4355b49928a 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst @@ -3,7 +3,7 @@ Form ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`Form ViewHelper Reference: neos.form:form`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst index 9879c19d84d..eb0a9632b9f 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Fusion.rst @@ -3,7 +3,7 @@ Fusion ViewHelper Reference ########################### -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`Fusion ViewHelper Reference: fusion:render`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst index 895e7e0a245..affad58f6dc 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst @@ -3,7 +3,7 @@ Media ViewHelper Reference ########################## -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`Media ViewHelper Reference: neos.media:fileTypeIcon`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst index a82cac259fe..cd54632b01b 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst @@ -3,7 +3,7 @@ Neos ViewHelper Reference ######################### -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`Neos ViewHelper Reference: neos:backend.authenticationProviderLabel`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst index adfa88e2413..a9324ad945b 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst @@ -3,7 +3,7 @@ TYPO3 Fluid ViewHelper Reference ################################ -This reference was automatically generated from code on 2023-11-01 +This reference was automatically generated from code on 2023-11-02 .. _`TYPO3 Fluid ViewHelper Reference: f:alias`: