From fd0b0bc24299505bb97b32bf9f6e15e61f809a7c Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:12:48 +0100 Subject: [PATCH 1/3] TASK: Adjust to subscription engine https://github.com/neos/neos-development-collection/pull/5321 --- Classes/CatchUpHook/DocumentUriPathProjectionHook.php | 5 +++-- .../CatchUpHook/DocumentUriPathProjectionHookFactory.php | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Classes/CatchUpHook/DocumentUriPathProjectionHook.php b/Classes/CatchUpHook/DocumentUriPathProjectionHook.php index 389962f..d721a2f 100644 --- a/Classes/CatchUpHook/DocumentUriPathProjectionHook.php +++ b/Classes/CatchUpHook/DocumentUriPathProjectionHook.php @@ -6,10 +6,11 @@ use Neos\ContentRepository\Core\Feature\NodeModification\Event\NodePropertiesWereSet; use Neos\ContentRepository\Core\Feature\NodeMove\Event\NodeAggregateWasMoved; use Neos\ContentRepository\Core\Feature\NodeRemoval\Event\NodeAggregateWasRemoved; -use Neos\ContentRepository\Core\Projection\CatchUpHookInterface; +use Neos\ContentRepository\Core\Projection\CatchUpHook\CatchUpHookInterface; use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; use Neos\ContentRepository\Core\SharedModel\Node\NodeAddress; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\Subscription\SubscriptionStatus; use Neos\EventStore\Model\EventEnvelope; use Neos\Neos\FrontendRouting\Exception\NodeNotFoundException; use Neos\Neos\FrontendRouting\Projection\DocumentNodeInfo; @@ -31,7 +32,7 @@ public function __construct( ) { } - public function onBeforeCatchUp(): void + public function onBeforeCatchUp(SubscriptionStatus $subscriptionStatus): void { // Nothing to do here } diff --git a/Classes/CatchUpHook/DocumentUriPathProjectionHookFactory.php b/Classes/CatchUpHook/DocumentUriPathProjectionHookFactory.php index 0a032ef..e6160b6 100644 --- a/Classes/CatchUpHook/DocumentUriPathProjectionHookFactory.php +++ b/Classes/CatchUpHook/DocumentUriPathProjectionHookFactory.php @@ -2,9 +2,9 @@ namespace Neos\RedirectHandler\NeosAdapter\CatchUpHook; -use Neos\ContentRepository\Core\Projection\CatchUpHookFactoryDependencies; -use Neos\ContentRepository\Core\Projection\CatchUpHookFactoryInterface; -use Neos\ContentRepository\Core\Projection\CatchUpHookInterface; +use Neos\ContentRepository\Core\Projection\CatchupHook\CatchUpHookFactoryDependencies; +use Neos\ContentRepository\Core\Projection\CatchupHook\CatchUpHookFactoryInterface; +use Neos\ContentRepository\Core\Projection\CatchupHook\CatchUpHookInterface; use Neos\Neos\FrontendRouting\Projection\DocumentUriPathFinder; use Neos\RedirectHandler\NeosAdapter\Service\NodeRedirectService; From 87e6fb6b11d829edbeb12ae71c9a66018507f1ef Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:09:24 +0100 Subject: [PATCH 2/3] TASK: Adjust tests to use new fake names --- Tests/Behavior/Features/Bootstrap/FeatureContext.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tests/Behavior/Features/Bootstrap/FeatureContext.php b/Tests/Behavior/Features/Bootstrap/FeatureContext.php index 4ea6d24..d77bef1 100644 --- a/Tests/Behavior/Features/Bootstrap/FeatureContext.php +++ b/Tests/Behavior/Features/Bootstrap/FeatureContext.php @@ -4,13 +4,13 @@ use Neos\Behat\FlowBootstrapTrait; use Neos\Behat\FlowEntitiesTrait; use Neos\ContentRepository\BehavioralTests\TestSuite\Behavior\CRBehavioralTestsSubjectProvider; -use Neos\ContentRepository\BehavioralTests\TestSuite\Behavior\GherkinPyStringNodeBasedNodeTypeManagerFactory; -use Neos\ContentRepository\BehavioralTests\TestSuite\Behavior\GherkinTableNodeBasedContentDimensionSourceFactory; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceFactoryInterface; use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceInterface; use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; use Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\CRTestSuiteTrait; +use Neos\ContentRepository\TestSuite\Fakes\FakeContentDimensionSourceFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeNodeTypeManagerFactory; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; require_once(__DIR__ . '/../../../../../../Neos/Neos.Neos/Tests/Behavior/Features/Bootstrap/RoutingTrait.php'); @@ -47,8 +47,8 @@ protected function createContentRepository( ): ContentRepository { $this->contentRepositoryRegistry->resetFactoryInstance($contentRepositoryId); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId); - GherkinTableNodeBasedContentDimensionSourceFactory::reset(); - GherkinPyStringNodeBasedNodeTypeManagerFactory::reset(); + FakeContentDimensionSourceFactory::reset(); + FakeNodeTypeManagerFactory::reset(); return $contentRepository; } From dd9fbca50fa77ad490832bb121eb465e323a6d18 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:25:30 +0100 Subject: [PATCH 3/3] TASK: Adjust to `onAfterBatchCompleted` --- Classes/CatchUpHook/DocumentUriPathProjectionHook.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/CatchUpHook/DocumentUriPathProjectionHook.php b/Classes/CatchUpHook/DocumentUriPathProjectionHook.php index d721a2f..81d6fd5 100644 --- a/Classes/CatchUpHook/DocumentUriPathProjectionHook.php +++ b/Classes/CatchUpHook/DocumentUriPathProjectionHook.php @@ -57,7 +57,7 @@ public function onAfterEvent(EventInterface $eventInstance, EventEnvelope $event }; } - public function onBeforeBatchCompleted(): void + public function onAfterBatchCompleted(): void { // Nothing to do here }