From 32b1a19c720cf8c2d1b6e584cebd881733edaa95 Mon Sep 17 00:00:00 2001 From: Denny Lubitz Date: Fri, 29 Sep 2023 22:41:05 +0200 Subject: [PATCH] TASK: Cleanup --- .../Rules/FusionContextCurrentSiteRector.php | 2 +- src/ContentRepository90/Rules/FusionContextInBackendRector.php | 2 +- src/ContentRepository90/Rules/FusionContextLiveRector.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ContentRepository90/Rules/FusionContextCurrentSiteRector.php b/src/ContentRepository90/Rules/FusionContextCurrentSiteRector.php index c57bbe4..b367e29 100644 --- a/src/ContentRepository90/Rules/FusionContextCurrentSiteRector.php +++ b/src/ContentRepository90/Rules/FusionContextCurrentSiteRector.php @@ -12,7 +12,7 @@ class FusionContextCurrentSiteRector implements FusionRectorInterface public function getRuleDefinition(): RuleDefinition { - return CodeSampleLoader::fromFile('Fusion: Rewrite node.context.inBackend to Neos.Node.inBackend(...)', __CLASS__); + return CodeSampleLoader::fromFile('Fusion: Rewrite node.context.currentSite to Neos.Site.findBySiteNode(site)', __CLASS__); } public function refactorFileContent(string $fileContent): string diff --git a/src/ContentRepository90/Rules/FusionContextInBackendRector.php b/src/ContentRepository90/Rules/FusionContextInBackendRector.php index f7f3afb..87f073c 100644 --- a/src/ContentRepository90/Rules/FusionContextInBackendRector.php +++ b/src/ContentRepository90/Rules/FusionContextInBackendRector.php @@ -12,7 +12,7 @@ class FusionContextInBackendRector implements FusionRectorInterface public function getRuleDefinition(): RuleDefinition { - return CodeSampleLoader::fromFile('Fusion: Rewrite node.context.inBackend to Neos.Node.inBackend(...)', __CLASS__); + return CodeSampleLoader::fromFile('Fusion: Rewrite "node.context.inBackend" to "renderingMode.isEdit"', __CLASS__); } public function refactorFileContent(string $fileContent): string diff --git a/src/ContentRepository90/Rules/FusionContextLiveRector.php b/src/ContentRepository90/Rules/FusionContextLiveRector.php index ca658db..4f95fba 100644 --- a/src/ContentRepository90/Rules/FusionContextLiveRector.php +++ b/src/ContentRepository90/Rules/FusionContextLiveRector.php @@ -12,7 +12,7 @@ class FusionContextLiveRector implements FusionRectorInterface public function getRuleDefinition(): RuleDefinition { - return CodeSampleLoader::fromFile('Fusion: Rewrite node.context.live to Neos.Node.isLive(...)', __CLASS__); + return CodeSampleLoader::fromFile('Fusion: Rewrite "node.context.live" to "!renderingMode.isEdit"', __CLASS__); } public function refactorFileContent(string $fileContent): string