-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Fix EmbedsContentStreamAndNodeAggregateId
interface for ESCR Events
#5152
Labels
Comments
mhsdesign
added a commit
to mhsdesign/neos-development-collection
that referenced
this issue
Jun 19, 2024
The property was previously named `$sourceNodeAggregateId` which is a total anomaly to all other events. To simplify code working with a range of events by interface (`EmbedsContentStreamAndNodeAggregateId`) we should align the name property. See also: neos#5152
6 tasks
EmbedsContentStreamAndNodeAggregateId
interface?EmbedsContentStreamAndNodeAggregateId
interface for ESCR Events
neos-bot
pushed a commit
to neos/contentgraph-doctrinedbaladapter
that referenced
this issue
Jul 8, 2024
The property was previously named `$sourceNodeAggregateId` which is a total anomaly to all other events. To simplify code working with a range of events by interface (`EmbedsContentStreamAndNodeAggregateId`) we should align the name property. See also: neos/neos-development-collection#5152
neos-bot
pushed a commit
to neos/contentgraph-postgresqladapter
that referenced
this issue
Jul 8, 2024
The property was previously named `$sourceNodeAggregateId` which is a total anomaly to all other events. To simplify code working with a range of events by interface (`EmbedsContentStreamAndNodeAggregateId`) we should align the name property. See also: neos/neos-development-collection#5152
neos-bot
pushed a commit
to neos/contentrepository-core
that referenced
this issue
Jul 8, 2024
The property was previously named `$sourceNodeAggregateId` which is a total anomaly to all other events. To simplify code working with a range of events by interface (`EmbedsContentStreamAndNodeAggregateId`) we should align the name property. See also: neos/neos-development-collection#5152
neos-bot
pushed a commit
to neos/neos
that referenced
this issue
Jul 8, 2024
The property was previously named `$sourceNodeAggregateId` which is a total anomaly to all other events. To simplify code working with a range of events by interface (`EmbedsContentStreamAndNodeAggregateId`) we should align the name property. See also: neos/neos-development-collection#5152
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With adding the workspace name to the events #4996 we are now more and more relying on
$event->workspaceName
making this interface partly obsolete.bastian said there:
For example here we would like to use the workspace name:
neos-development-collection/Neos.Neos/Classes/Fusion/Cache/GraphProjectorCatchUpHookForCacheFlushing.php
Line 184 in 8796218
The
EmbedsContentStreamAndNodeAggregateId
interface is implemented 16 times.Where its methods are nearly always implemented like:
With one exception, the
NodeReferencesWereSet
doesnt have anodeAggregateId
property but its namedsourceNodeAggregateId
(unfortunately) -> to be fixed via #5153But then again a bit of classification among the events would be great so we could easily allow them in
canHandle
when writing projections like we do already:neos-development-collection/Neos.ContentRepository.Core/Classes/Projection/ContentStream/ContentStreamProjection.php
Line 167 in f00bce7
See slack discussion: https://neos-project.slack.com/archives/C04PYL8H3/p1711392719268439?thread_ts=1711353783.863809&cid=C04PYL8H3
So i would propose to add the workspace to the interface and rename it to something like
EmbedsWorkspaceNameAndNodeAggregateId
. Ideally we would also not have to introduce a new getter everywhere (getWorkspaceName
) as this is a lot of boiler plate, and b opens the question wether to use $event->workspaceName directly or the getter.With Php8.4 property hooks https://wiki.php.net/rfc/property-hooks we could write
maybe we can use this already in a similar fashion leveraging phps
@property
and phpstan? But in that case we will stumble over thatNodeReferencesWereSet
as a anomaly and doesnt call it$nodeAggregateId
-> to be fixed via #5153The text was updated successfully, but these errors were encountered: