From c682516110655efca2199c149b4b8ff565f8a162 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Sat, 22 Jun 2024 20:08:49 +0200 Subject: [PATCH] FEATURE: Adjust disabled feature to work with NodeMutator architecture - introduce $showDisabledNodesInSubgraph in tests to show disabled created nodes - introduce `NodeMutator::setDisabled` - updated all snapshots to include `"disabled": false,` --- .../NodeCreation/NodeCreationService.php | 12 ++------ Classes/Domain/NodeCreation/NodeMutator.php | 13 +++++++++ .../NodeCreation/NodeMutatorCollection.php | 2 +- .../NodeCreation/PropertiesProcessor.php | 2 +- Classes/Domain/Template/RootTemplate.php | 8 +++--- Classes/Domain/Template/Template.php | 6 ++-- .../TemplateConfigurationProcessor.php | 2 +- .../AbstractNodeTemplateTestCase.php | 28 +++++++++++-------- .../Snapshots/AllowedChildNodes.template.json | 3 ++ .../Snapshots/ChildNodes.template.json | 5 ++++ .../DisallowedChildNodes.template.json | 4 +++ .../Features/Disabled/DisabledTest.php | 27 ++++++++++++++++++ .../Features/Disabled/NodeTypes.Disabled.yaml | 7 +++++ .../Disabled/Snapshots/Disabled.nodes.json | 3 ++ .../Disabled/Snapshots/Disabled.template.json | 5 ++++ .../Features/Disabled/Snapshots/Disabled.yaml | 3 ++ .../Snapshots/OnlyExceptions.template.json | 1 + .../Snapshots/SomeExceptions.messages.json | 2 +- .../Snapshots/SomeExceptions.template.json | 9 ++++++ .../Snapshots/NestedNodeNames.template.json | 3 ++ .../Snapshots/NodeNames.template.json | 6 ++++ .../Pages/Snapshots/Pages1.template.json | 12 ++++++++ .../Pages/Snapshots/Pages2.template.json | 12 ++++++++ .../Snapshots/Properties.template.json | 1 + .../ResolvableProperties.template.json | 1 + .../UnresolvableProperties.template.json | 1 + .../Snapshots/NodeTemplateValidateOutput.log | 4 +-- .../Snapshots/Variables.template.json | 1 + 28 files changed, 150 insertions(+), 33 deletions(-) create mode 100644 Tests/Functional/Features/Disabled/DisabledTest.php create mode 100644 Tests/Functional/Features/Disabled/NodeTypes.Disabled.yaml create mode 100644 Tests/Functional/Features/Disabled/Snapshots/Disabled.nodes.json create mode 100644 Tests/Functional/Features/Disabled/Snapshots/Disabled.template.json create mode 100644 Tests/Functional/Features/Disabled/Snapshots/Disabled.yaml diff --git a/Classes/Domain/NodeCreation/NodeCreationService.php b/Classes/Domain/NodeCreation/NodeCreationService.php index 61cf247..cb25400 100644 --- a/Classes/Domain/NodeCreation/NodeCreationService.php +++ b/Classes/Domain/NodeCreation/NodeCreationService.php @@ -53,12 +53,9 @@ public function createMutatorsForRootTemplate(RootTemplate $template, NodeType $ $this->referencesProcessor->processAndValidateReferences($node, $processingErrors) ); - if ($template->getDisabled() === true) { - $node->setHidden(true); - } - return NodeMutatorCollection::from( NodeMutator::setProperties($validProperties), + NodeMutator::setDisabled($template->getDisabled()), $this->createMutatorForUriPathSegment($template->getProperties()), )->merge( $this->createMutatorsForChildNodeTemplates( @@ -71,7 +68,7 @@ public function createMutatorsForRootTemplate(RootTemplate $template, NodeType $ private function createMutatorsForChildNodeTemplates(Templates $templates, TransientNode $parentNode, ProcessingErrors $processingErrors): NodeMutatorCollection { - $nodeMutators = NodeMutatorCollection::empty(); + $nodeMutators = NodeMutatorCollection::createEmpty(); // `hasAutoCreatedChildNode` actually has a bug; it looks up the NodeName parameter against the raw configuration instead of the transliterated NodeName // https://github.com/neos/neos-ui/issues/3527 @@ -157,6 +154,7 @@ private function createMutatorsForChildNodeTemplates(Templates $templates, Trans NodeMutatorCollection::from( NodeMutator::createAndSelectNode($template->getType(), $template->getName()), NodeMutator::setProperties($validProperties), + NodeMutator::setDisabled($template->getDisabled()), $this->createMutatorForUriPathSegment($template->getProperties()) )->merge($this->createMutatorsForChildNodeTemplates( $template->getChildNodes(), @@ -168,10 +166,6 @@ private function createMutatorsForChildNodeTemplates(Templates $templates, Trans } - if ($template->getDisabled() === true) { - $node->setHidden(true); - } - return $nodeMutators; } diff --git a/Classes/Domain/NodeCreation/NodeMutator.php b/Classes/Domain/NodeCreation/NodeMutator.php index 02c5d35..23e4558 100644 --- a/Classes/Domain/NodeCreation/NodeMutator.php +++ b/Classes/Domain/NodeCreation/NodeMutator.php @@ -48,6 +48,19 @@ public static function setProperties(array $properties): self }); } + /** + * Queues to disable the current node. + * + * Preserves the current node pointer. + */ + public static function setDisabled(bool $disabled): self + { + return new self(function (NodeInterface $nodePointer) use ($disabled) { + $nodePointer->setHidden($disabled); + return null; + }); + } + /** * Queues to execute the collection {@see NodeMutatorCollection} on the current node. * Any selections made in the collection {@see self::selectChildNode()} won't change the pointer to $this current node. diff --git a/Classes/Domain/NodeCreation/NodeMutatorCollection.php b/Classes/Domain/NodeCreation/NodeMutatorCollection.php index e5c91b2..0846e34 100644 --- a/Classes/Domain/NodeCreation/NodeMutatorCollection.php +++ b/Classes/Domain/NodeCreation/NodeMutatorCollection.php @@ -29,7 +29,7 @@ public static function from(NodeMutator ...$items): self return new self(...$items); } - public static function empty(): self + public static function createEmpty(): self { return new self(); } diff --git a/Classes/Domain/NodeCreation/PropertiesProcessor.php b/Classes/Domain/NodeCreation/PropertiesProcessor.php index 329d79a..d4dee94 100644 --- a/Classes/Domain/NodeCreation/PropertiesProcessor.php +++ b/Classes/Domain/NodeCreation/PropertiesProcessor.php @@ -95,7 +95,7 @@ private function assertValidPropertyName($propertyName): void if ($propertyName[0] === '_') { $lowerPropertyName = strtolower($propertyName); if ($lowerPropertyName === '_hidden') { - throw new PropertyIgnoredException('Using "_hidden" as property declaration was removed. Please use "disabled" on the first level instead.'); + throw new PropertyIgnoredException('Using "_hidden" as property declaration was removed. Please use "disabled" on the first level instead.', 1719079679); } foreach ($legacyInternalProperties as $legacyInternalProperty) { if ($lowerPropertyName === strtolower($legacyInternalProperty)) { diff --git a/Classes/Domain/Template/RootTemplate.php b/Classes/Domain/Template/RootTemplate.php index 9d07b7c..3bd02cb 100644 --- a/Classes/Domain/Template/RootTemplate.php +++ b/Classes/Domain/Template/RootTemplate.php @@ -12,7 +12,7 @@ */ class RootTemplate implements \JsonSerializable { - private ?bool $disabled; + private bool $disabled; /** * @var array @@ -25,7 +25,7 @@ class RootTemplate implements \JsonSerializable * @internal * @param array $properties */ - public function __construct(?bool $disabled, array $properties, Templates $childNodes) + public function __construct(bool $disabled, array $properties, Templates $childNodes) { $this->disabled = $disabled; $this->properties = $properties; @@ -34,10 +34,10 @@ public function __construct(?bool $disabled, array $properties, Templates $child public static function empty(): self { - return new RootTemplate(null, [], Templates::empty()); + return new RootTemplate(false, [], Templates::empty()); } - public function getDisabled(): ?bool + public function getDisabled(): bool { return $this->disabled; } diff --git a/Classes/Domain/Template/Template.php b/Classes/Domain/Template/Template.php index aa46f2c..4cd5efe 100644 --- a/Classes/Domain/Template/Template.php +++ b/Classes/Domain/Template/Template.php @@ -18,7 +18,7 @@ class Template implements \JsonSerializable private ?NodeName $name; - private ?bool $disabled; + private bool $disabled; /** * @var array @@ -31,7 +31,7 @@ class Template implements \JsonSerializable * @internal * @param array $properties */ - public function __construct(?NodeTypeName $type, ?NodeName $name, ?bool $disabled, array $properties, Templates $childNodes) + public function __construct(?NodeTypeName $type, ?NodeName $name, bool $disabled, array $properties, Templates $childNodes) { $this->type = $type; $this->name = $name; @@ -50,7 +50,7 @@ public function getName(): ?NodeName return $this->name; } - public function getDisabled(): ?bool + public function getDisabled(): bool { return $this->disabled; } diff --git a/Classes/Domain/TemplateConfiguration/TemplateConfigurationProcessor.php b/Classes/Domain/TemplateConfiguration/TemplateConfigurationProcessor.php index b87b39e..09610ff 100644 --- a/Classes/Domain/TemplateConfiguration/TemplateConfigurationProcessor.php +++ b/Classes/Domain/TemplateConfiguration/TemplateConfigurationProcessor.php @@ -139,7 +139,7 @@ private function createTemplateFromTemplatePart(TemplatePart $templatePart): Tem return new Template( $type !== null ? NodeTypeName::fromString($type) : null, $name !== null ? NodeName::fromString(Utility::renderValidNodeName($name)) : null, - $templatePart->hasConfiguration('disabled') ? (bool)$templatePart->processConfiguration('disabled') : null, + (bool)$templatePart->processConfiguration('disabled'), $processedProperties, $childNodeTemplates ); diff --git a/Tests/Functional/AbstractNodeTemplateTestCase.php b/Tests/Functional/AbstractNodeTemplateTestCase.php index 5690313..941fd68 100644 --- a/Tests/Functional/AbstractNodeTemplateTestCase.php +++ b/Tests/Functional/AbstractNodeTemplateTestCase.php @@ -28,6 +28,8 @@ abstract class AbstractNodeTemplateTestCase extends FunctionalTestCase use WithConfigurationTrait; use FakeNodeTypeManagerTrait; + protected static bool $showDisabledNodesInSubgraph = false; + protected static $testablePersistenceEnabled = true; private ContextFactoryInterface $contextFactory; @@ -44,21 +46,21 @@ abstract class AbstractNodeTemplateTestCase extends FunctionalTestCase private string $fixturesDir; - /** @deprecated please use {@see self::getObject()} instead */ + /** @internal please use {@see self::getObject()} instead */ protected $objectManager; public function setUp(): void { parent::setUp(); - $this->nodeTypeManager = $this->objectManager->get(NodeTypeManager::class); + $this->nodeTypeManager = $this->getObject(NodeTypeManager::class); $this->loadFakeNodeTypes(); $this->setupContentRepository(); - $this->nodeTemplateDumper = $this->objectManager->get(NodeTemplateDumper::class); + $this->nodeTemplateDumper = $this->getObject(NodeTemplateDumper::class); - $templateFactory = $this->objectManager->get(TemplateConfigurationProcessor::class); + $templateFactory = $this->getObject(TemplateConfigurationProcessor::class); $templateFactoryMock = $this->getMockBuilder(TemplateConfigurationProcessor::class)->disableOriginalConstructor()->getMock(); $templateFactoryMock->expects(self::once())->method('processTemplateConfiguration')->willReturnCallback(function (...$args) use($templateFactory) { @@ -76,7 +78,7 @@ public function tearDown(): void { parent::tearDown(); $this->inject($this->contextFactory, 'contextInstances', []); - $this->objectManager->get(FeedbackCollection::class)->reset(); + $this->getObject(FeedbackCollection::class)->reset(); $this->objectManager->forgetInstance(ContentDimensionRepository::class); $this->objectManager->forgetInstance(TemplateConfigurationProcessor::class); $this->objectManager->forgetInstance(NodeTypeManager::class); @@ -96,20 +98,20 @@ final protected function getObject(string $className): object private function setupContentRepository(): void { // Create an environment to create nodes. - $this->objectManager->get(ContentDimensionRepository::class)->setDimensionsConfiguration([]); + $this->getObject(ContentDimensionRepository::class)->setDimensionsConfiguration([]); $liveWorkspace = new Workspace('live'); - $workspaceRepository = $this->objectManager->get(WorkspaceRepository::class); + $workspaceRepository = $this->getObject(WorkspaceRepository::class); $workspaceRepository->add($liveWorkspace); $testSite = new Site('test-site'); $testSite->setSiteResourcesPackageKey('Test.Site'); - $siteRepository = $this->objectManager->get(SiteRepository::class); + $siteRepository = $this->getObject(SiteRepository::class); $siteRepository->add($testSite); $this->persistenceManager->persistAll(); - $this->contextFactory = $this->objectManager->get(ContextFactoryInterface::class); - $subgraph = $this->contextFactory->create(['workspaceName' => 'live']); + $this->contextFactory = $this->getObject(ContextFactoryInterface::class); + $subgraph = $this->contextFactory->create(['workspaceName' => 'live', 'invisibleContentShown' => static::$showDisabledNodesInSubgraph]); $rootNode = $subgraph->getRootNode(); @@ -153,7 +155,11 @@ protected function createNodeInto(NodeInterface $targetNode, string $nodeTypeNam assert($changeCollection instanceof ChangeCollection); $changeCollection->apply(); - return $targetNode->getNode('new-node'); + $newNode = $targetNode->getNode('new-node'); + if (!$newNode) { + throw new \RuntimeException('New node not found at expected location. Try settting $showDisabledNodesInSubgraph.', 1719079419); + } + return $newNode; } protected function createFakeNode(string $nodeAggregateId): NodeInterface diff --git a/Tests/Functional/Features/ChildNodes/Snapshots/AllowedChildNodes.template.json b/Tests/Functional/Features/ChildNodes/Snapshots/AllowedChildNodes.template.json index 5b4f019..9f19ca0 100644 --- a/Tests/Functional/Features/ChildNodes/Snapshots/AllowedChildNodes.template.json +++ b/Tests/Functional/Features/ChildNodes/Snapshots/AllowedChildNodes.template.json @@ -1,14 +1,17 @@ { + "disabled": false, "properties": [], "childNodes": [ { "type": null, "name": "content", + "disabled": false, "properties": [], "childNodes": [ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "Text" }, diff --git a/Tests/Functional/Features/ChildNodes/Snapshots/ChildNodes.template.json b/Tests/Functional/Features/ChildNodes/Snapshots/ChildNodes.template.json index 973a42e..c08358a 100644 --- a/Tests/Functional/Features/ChildNodes/Snapshots/ChildNodes.template.json +++ b/Tests/Functional/Features/ChildNodes/Snapshots/ChildNodes.template.json @@ -1,14 +1,17 @@ { + "disabled": false, "properties": [], "childNodes": [ { "type": null, "name": "column0", + "disabled": false, "properties": [], "childNodes": [ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "

foo<\/p>" }, @@ -19,11 +22,13 @@ { "type": null, "name": "column1", + "disabled": false, "properties": [], "childNodes": [ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "

bar<\/p>" }, diff --git a/Tests/Functional/Features/ChildNodes/Snapshots/DisallowedChildNodes.template.json b/Tests/Functional/Features/ChildNodes/Snapshots/DisallowedChildNodes.template.json index 14a1692..5fdc2a0 100644 --- a/Tests/Functional/Features/ChildNodes/Snapshots/DisallowedChildNodes.template.json +++ b/Tests/Functional/Features/ChildNodes/Snapshots/DisallowedChildNodes.template.json @@ -1,14 +1,17 @@ { + "disabled": false, "properties": [], "childNodes": [ { "type": null, "name": "content", + "disabled": false, "properties": [], "childNodes": [ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "Text" }, @@ -19,6 +22,7 @@ { "type": "Flowpack.NodeTemplates:Document.Page", "name": "illegal-node-1", + "disabled": false, "properties": [], "childNodes": [] } diff --git a/Tests/Functional/Features/Disabled/DisabledTest.php b/Tests/Functional/Features/Disabled/DisabledTest.php new file mode 100644 index 0000000..3a89067 --- /dev/null +++ b/Tests/Functional/Features/Disabled/DisabledTest.php @@ -0,0 +1,27 @@ +createNodeInto( + $this->homePageMainContentCollectionNode, + 'Flowpack.NodeTemplates:Content.Disabled', + [] + ); + + $this->assertLastCreatedTemplateMatchesSnapshot('Disabled'); + + $this->assertNoExceptionsWereCaught(); + $this->assertNodeDumpAndTemplateDumpMatchSnapshot('Disabled', $createdNode); + } +} diff --git a/Tests/Functional/Features/Disabled/NodeTypes.Disabled.yaml b/Tests/Functional/Features/Disabled/NodeTypes.Disabled.yaml new file mode 100644 index 0000000..0cd7394 --- /dev/null +++ b/Tests/Functional/Features/Disabled/NodeTypes.Disabled.yaml @@ -0,0 +1,7 @@ + +'Flowpack.NodeTemplates:Content.Disabled': + superTypes: + 'Neos.Neos:Content': true + options: + template: + disabled: true diff --git a/Tests/Functional/Features/Disabled/Snapshots/Disabled.nodes.json b/Tests/Functional/Features/Disabled/Snapshots/Disabled.nodes.json new file mode 100644 index 0000000..d2b4484 --- /dev/null +++ b/Tests/Functional/Features/Disabled/Snapshots/Disabled.nodes.json @@ -0,0 +1,3 @@ +{ + "isDisabled": true +} diff --git a/Tests/Functional/Features/Disabled/Snapshots/Disabled.template.json b/Tests/Functional/Features/Disabled/Snapshots/Disabled.template.json new file mode 100644 index 0000000..0909a16 --- /dev/null +++ b/Tests/Functional/Features/Disabled/Snapshots/Disabled.template.json @@ -0,0 +1,5 @@ +{ + "disabled": true, + "properties": [], + "childNodes": [] +} diff --git a/Tests/Functional/Features/Disabled/Snapshots/Disabled.yaml b/Tests/Functional/Features/Disabled/Snapshots/Disabled.yaml new file mode 100644 index 0000000..f133bb4 --- /dev/null +++ b/Tests/Functional/Features/Disabled/Snapshots/Disabled.yaml @@ -0,0 +1,3 @@ +'{nodeTypeName}': + options: + template: [] diff --git a/Tests/Functional/Features/Exceptions/Snapshots/OnlyExceptions.template.json b/Tests/Functional/Features/Exceptions/Snapshots/OnlyExceptions.template.json index a61e568..8ea2e9c 100644 --- a/Tests/Functional/Features/Exceptions/Snapshots/OnlyExceptions.template.json +++ b/Tests/Functional/Features/Exceptions/Snapshots/OnlyExceptions.template.json @@ -1,4 +1,5 @@ { + "disabled": false, "properties": [], "childNodes": [] } diff --git a/Tests/Functional/Features/Exceptions/Snapshots/SomeExceptions.messages.json b/Tests/Functional/Features/Exceptions/Snapshots/SomeExceptions.messages.json index 3e23bdd..d9d89e7 100644 --- a/Tests/Functional/Features/Exceptions/Snapshots/SomeExceptions.messages.json +++ b/Tests/Functional/Features/Exceptions/Snapshots/SomeExceptions.messages.json @@ -52,7 +52,7 @@ "severity": "ERROR" }, { - "message": "Property \"_hidden\" in NodeType \"Flowpack.NodeTemplates:Content.SomeExceptions\" | PropertyIgnoredException(Because internal legacy property \"_hidden\" not implement., 1686149513158)", + "message": "Property \"_hidden\" in NodeType \"Flowpack.NodeTemplates:Content.SomeExceptions\" | PropertyIgnoredException(Using \"_hidden\" as property declaration was removed. Please use \"disabled\" on the first level instead., 1719079679)", "severity": "ERROR" }, { diff --git a/Tests/Functional/Features/Exceptions/Snapshots/SomeExceptions.template.json b/Tests/Functional/Features/Exceptions/Snapshots/SomeExceptions.template.json index 891cc60..20a5901 100644 --- a/Tests/Functional/Features/Exceptions/Snapshots/SomeExceptions.template.json +++ b/Tests/Functional/Features/Exceptions/Snapshots/SomeExceptions.template.json @@ -1,4 +1,5 @@ { + "disabled": false, "properties": { "_hidden": true, "_hiddenAfterDateTime": 123, @@ -15,6 +16,7 @@ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "bar" }, @@ -23,12 +25,14 @@ { "type": "Neos.Neos:Node", "name": null, + "disabled": false, "properties": [], "childNodes": [] }, { "type": "Flowpack.NodeTemplates:Document.Page", "name": "illegal", + "disabled": false, "properties": { "text": "huhu" }, @@ -37,6 +41,7 @@ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "123" }, @@ -45,6 +50,7 @@ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "foo" }, @@ -53,18 +59,21 @@ { "type": null, "name": null, + "disabled": false, "properties": [], "childNodes": [] }, { "type": "Flowpack.NodeTemplates:InvalidNodeType", "name": null, + "disabled": false, "properties": [], "childNodes": [] }, { "type": "Flowpack.NodeTemplates:Content.SomeExceptions", "name": "type-cant-mutate", + "disabled": false, "properties": [], "childNodes": [] } diff --git a/Tests/Functional/Features/NodeNames/Snapshots/NestedNodeNames.template.json b/Tests/Functional/Features/NodeNames/Snapshots/NestedNodeNames.template.json index f10add1..c8e56da 100644 --- a/Tests/Functional/Features/NodeNames/Snapshots/NestedNodeNames.template.json +++ b/Tests/Functional/Features/NodeNames/Snapshots/NestedNodeNames.template.json @@ -1,14 +1,17 @@ { + "disabled": false, "properties": [], "childNodes": [ { "type": null, "name": "container", + "disabled": false, "properties": [], "childNodes": [ { "type": null, "name": "text", + "disabled": false, "properties": { "text": "nested text" }, diff --git a/Tests/Functional/Features/NodeNames/Snapshots/NodeNames.template.json b/Tests/Functional/Features/NodeNames/Snapshots/NodeNames.template.json index e7320bc..2893345 100644 --- a/Tests/Functional/Features/NodeNames/Snapshots/NodeNames.template.json +++ b/Tests/Functional/Features/NodeNames/Snapshots/NodeNames.template.json @@ -1,9 +1,11 @@ { + "disabled": false, "properties": [], "childNodes": [ { "type": null, "name": "my-node", + "disabled": false, "properties": { "text": "legalNodeName" }, @@ -12,6 +14,7 @@ { "type": null, "name": "foobar", + "disabled": false, "properties": { "text": "capitalsInName" }, @@ -20,6 +23,7 @@ { "type": null, "name": "o", + "disabled": false, "properties": { "text": "\u00f6 - was soll das" }, @@ -28,6 +32,7 @@ { "type": null, "name": "ablabei-jing-ss-ha", + "disabled": false, "properties": { "text": "everythingMixedTogether" }, @@ -36,6 +41,7 @@ { "type": null, "name": "node-d41d8cd98f00b204e9800998ecf8427e", + "disabled": false, "properties": { "text": "emptyString" }, diff --git a/Tests/Functional/Features/Pages/Snapshots/Pages1.template.json b/Tests/Functional/Features/Pages/Snapshots/Pages1.template.json index 37cee55..e585452 100644 --- a/Tests/Functional/Features/Pages/Snapshots/Pages1.template.json +++ b/Tests/Functional/Features/Pages/Snapshots/Pages1.template.json @@ -1,4 +1,5 @@ { + "disabled": false, "properties": { "title": "Page1", "uriPathSegment": "page1" @@ -7,11 +8,13 @@ { "type": null, "name": "main", + "disabled": false, "properties": [], "childNodes": [ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "textOnPage1" }, @@ -22,6 +25,7 @@ { "type": "Flowpack.NodeTemplates:Document.Page", "name": null, + "disabled": false, "properties": { "title": "Page2", "uriPathSegment": "page2" @@ -30,11 +34,13 @@ { "type": null, "name": "main", + "disabled": false, "properties": [], "childNodes": [ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "textOnPage2" }, @@ -45,6 +51,7 @@ { "type": "Flowpack.NodeTemplates:Document.Page", "name": null, + "disabled": false, "properties": { "title": "Page3", "uriPathSegment": "page3" @@ -53,11 +60,13 @@ { "type": null, "name": "main", + "disabled": false, "properties": [], "childNodes": [ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "textOnPage3" }, @@ -72,6 +81,7 @@ { "type": "Flowpack.NodeTemplates:Document.Page", "name": null, + "disabled": false, "properties": { "title": "Page4", "uriPathSegment": "page4" @@ -80,11 +90,13 @@ { "type": null, "name": "main", + "disabled": false, "properties": [], "childNodes": [ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "textOnPage4" }, diff --git a/Tests/Functional/Features/Pages/Snapshots/Pages2.template.json b/Tests/Functional/Features/Pages/Snapshots/Pages2.template.json index a2517ab..5ec99f7 100644 --- a/Tests/Functional/Features/Pages/Snapshots/Pages2.template.json +++ b/Tests/Functional/Features/Pages/Snapshots/Pages2.template.json @@ -1,14 +1,17 @@ { + "disabled": false, "properties": [], "childNodes": [ { "type": null, "name": "main", + "disabled": false, "properties": [], "childNodes": [ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "textOnPage1" }, @@ -19,6 +22,7 @@ { "type": "Flowpack.NodeTemplates:Document.Page", "name": null, + "disabled": false, "properties": { "title": "Page2" }, @@ -26,11 +30,13 @@ { "type": null, "name": "main", + "disabled": false, "properties": [], "childNodes": [ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "textOnPage2" }, @@ -41,6 +47,7 @@ { "type": "Flowpack.NodeTemplates:Document.Page", "name": null, + "disabled": false, "properties": { "title": "Page3", "uriPathSegment": "page3" @@ -49,11 +56,13 @@ { "type": null, "name": "main", + "disabled": false, "properties": [], "childNodes": [ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "textOnPage3" }, @@ -68,6 +77,7 @@ { "type": "Flowpack.NodeTemplates:Document.Page", "name": null, + "disabled": false, "properties": { "title": "Page4" }, @@ -75,11 +85,13 @@ { "type": null, "name": "main", + "disabled": false, "properties": [], "childNodes": [ { "type": "Flowpack.NodeTemplates:Content.Text", "name": null, + "disabled": false, "properties": { "text": "textOnPage4" }, diff --git a/Tests/Functional/Features/Properties/Snapshots/Properties.template.json b/Tests/Functional/Features/Properties/Snapshots/Properties.template.json index 81c8297..c17d496 100644 --- a/Tests/Functional/Features/Properties/Snapshots/Properties.template.json +++ b/Tests/Functional/Features/Properties/Snapshots/Properties.template.json @@ -1,4 +1,5 @@ { + "disabled": false, "properties": { "text": "abc", "isEnchanted": false, diff --git a/Tests/Functional/Features/ResolvableProperties/Snapshots/ResolvableProperties.template.json b/Tests/Functional/Features/ResolvableProperties/Snapshots/ResolvableProperties.template.json index 7b462df..c92a5af 100644 --- a/Tests/Functional/Features/ResolvableProperties/Snapshots/ResolvableProperties.template.json +++ b/Tests/Functional/Features/ResolvableProperties/Snapshots/ResolvableProperties.template.json @@ -1,4 +1,5 @@ { + "disabled": false, "properties": { "asset": "c228200e-7472-4290-9936-4454a5b5692a", "reference": "some-node-id", diff --git a/Tests/Functional/Features/ResolvableProperties/Snapshots/UnresolvableProperties.template.json b/Tests/Functional/Features/ResolvableProperties/Snapshots/UnresolvableProperties.template.json index 0921e0b..816ae2c 100644 --- a/Tests/Functional/Features/ResolvableProperties/Snapshots/UnresolvableProperties.template.json +++ b/Tests/Functional/Features/ResolvableProperties/Snapshots/UnresolvableProperties.template.json @@ -1,4 +1,5 @@ { + "disabled": false, "properties": { "someString": [ "foo" diff --git a/Tests/Functional/Features/StandaloneValidationCommand/Snapshots/NodeTemplateValidateOutput.log b/Tests/Functional/Features/StandaloneValidationCommand/Snapshots/NodeTemplateValidateOutput.log index e4e0f03..a516b2c 100644 --- a/Tests/Functional/Features/StandaloneValidationCommand/Snapshots/NodeTemplateValidateOutput.log +++ b/Tests/Functional/Features/StandaloneValidationCommand/Snapshots/NodeTemplateValidateOutput.log @@ -1,4 +1,4 @@ -10 of 15 NodeType template validated. 5 could not be build standalone. +11 of 16 NodeType template validated. 5 could not be build standalone. Flowpack.NodeTemplates:Content.DisallowedChildNodes NodeConstraintException(Node type "Flowpack.NodeTemplates:Content.Text" is not allowed below tethered child nodes "content" of nodes of type "Flowpack.NodeTemplates:Content.DisallowedChildNodes", 1687541480146) @@ -42,7 +42,7 @@ Flowpack.NodeTemplates:Content.SomeExceptions Configuration "childNodes.invalidOption.crazy" | InvalidArgumentException(Template configuration has illegal key "crazy", 1686150349274) - Property "_hidden" in NodeType "Flowpack.NodeTemplates:Content.SomeExceptions" | PropertyIgnoredException(Because internal legacy property "_hidden" not implement., 1686149513158) + Property "_hidden" in NodeType "Flowpack.NodeTemplates:Content.SomeExceptions" | PropertyIgnoredException(Using "_hidden" as property declaration was removed. Please use "disabled" on the first level instead., 1719079679) Property "_hiddenAfterDateTime" in NodeType "Flowpack.NodeTemplates:Content.SomeExceptions" | PropertyIgnoredException(Because internal legacy property "_hiddenAfterDateTime" not implement., 1686149513158) diff --git a/Tests/Functional/Features/Variables/Snapshots/Variables.template.json b/Tests/Functional/Features/Variables/Snapshots/Variables.template.json index 3602f63..8ae697d 100644 --- a/Tests/Functional/Features/Variables/Snapshots/Variables.template.json +++ b/Tests/Functional/Features/Variables/Snapshots/Variables.template.json @@ -1,4 +1,5 @@ { + "disabled": false, "properties": { "text": "parentNode(Neos.Neos:ContentCollection, main) site(unstructured, test-site)" },