-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
!!! FEATURE: Overhaul catch up implementation #4405
Conversation
and add default cases for all `match ($event::class)` calls
@bwaidelich IMHO this looks really good. Tests work still (as expected <3) So I'd say this is pretty much merge ready? (Not merging yet because the checkboxes ar enot yet ticked ;) ) |
use Neos\EventStore\Model\EventStream\EventStreamInterface; | ||
use Neos\EventStore\Model\Event\SequenceNumber; | ||
|
||
use function get_debug_type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wasnt sure what we discussed, if we now like to adapt this code style or not - but it turns out we have yet no 100% clear decision: https://neos-project.slack.com/archives/C04Q0TC15/p1692352868964289?thread_ts=1683558218.323329&cid=C04Q0TC15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. I just left some nitpic comments. 👍
Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Projection/HypergraphProjection.php
Outdated
Show resolved
Hide resolved
Neos.ContentRepository.Core/Classes/Projection/ContentStream/ContentStreamProjection.php
Outdated
Show resolved
Hide resolved
Neos.ContentRepository.Core/Classes/Projection/NodeHiddenState/NodeHiddenStateProjection.php
Outdated
Show resolved
Hide resolved
Neos.ContentRepository.Core/Classes/Projection/Workspace/WorkspaceProjection.php
Outdated
Show resolved
Hide resolved
Neos.Neos/Classes/AssetUsage/Projection/AssetUsageProjection.php
Outdated
Show resolved
Hide resolved
Neos.ContentGraph.DoctrineDbalAdapter/src/DoctrineDbalContentGraphProjection.php
Outdated
Show resolved
Hide resolved
Neos.ContentRepository.Core/Classes/CommandHandler/PendingProjections.php
Outdated
Show resolved
Hide resolved
Otherwise, looks great! Let's merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice, let's do this!
After neos#4405 a lot of things changed.
After #4405 a lot of things changed.
After #4405 a lot of things changed.
After #4405 a lot of things changed.
After #4405 a lot of things changed.
After neos/neos-development-collection#4405 a lot of things changed.
During extending phpstan to more packages (neos#4650) the migration was dropped. The code had become already outdated by then as the api was changed a lot. This service should function as boilerplate for new migrations. WIP: Try to fix previous `EventMigrationService` After neos#4405 a lot of things changed. WIP: Write migration for workspace rename untested.
During extending phpstan to more packages (neos#4650) the migration was dropped. The code had become already outdated by then as the api was changed a lot. This service should function as boilerplate for new migrations. WIP: Try to fix previous `EventMigrationService` After neos#4405 a lot of things changed. WIP: Write migration for workspace rename untested.
During extending phpstan to more packages (neos#4650) the migration was dropped. The code had become already outdated by then as the api was changed a lot. This service should function as boilerplate for new migrations. WIP: Try to fix previous `EventMigrationService` After neos#4405 a lot of things changed. WIP: Write migration for workspace rename untested.
Mainly adjusts the ProjectionInterface such that the iteration of events can happen outside of the implementation.
This allows to centralize logic which enables us to:
Breaking Change
This is a breaking change only if you implemented a custom implementation of the
ProjectionInterface
:1.
canHandle()
now gets an instance of the domainEventInterface
instead of the low level ES eventThe code can be adjusted like this:
=>
2.
catchUp()
has been replaced withapply()
The code can be adjusted like this:
=>
Note: The
EventEnvelope
gets passed in as 2nd argument and can be implemented if access to low-level details (e.g. event metadata) is needed:3.
getSequenceNumber()
was replaced bygetCheckpointStorage()
This enables the framework to use the
CatchUp
helper in the outer layers and it will allow us to implement better "blocking" mechanisms in the futureThe code can be adjusted like this:
=>
Resolves: #4289