Skip to content
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

Intial event commit id support #11607

Draft
wants to merge 1 commit into
base: 2.20.x
Choose a base branch
from

Conversation

pkly
Copy link

@pkly pkly commented Sep 23, 2024

Hey,

This is a draft with an idea for discerning which UoW commit we're running the events for.
The idea behind this is that as of now I'm unable to detect what is the "context" for the events being sent. As such, it is not possible to properly queue things with PostFlush in our event library here.

I'd like to be able to detect the context the events are running in, as I might delay dispatching of symfony events until PostFlush occurs. As of now, any events which fit the criteria will be added to a dispatch queue, which once ran will trigger more events, which then may in turn trigger more events... etc etc.
The point is not to stop this behavior, but rather to detect the correct order of dispatching of said events, for which I'd need the functionality below.

I would appriciate all and any feedback, along with information if you'd consider adding said feature, should it be done to your satisfaction. For now, this is simply an idea, might also be in the incorrect branch, but I don't think it's a BC break? (though it might be because of the additional parameter)?

The CommitEventId logic could be simplified a bit by modifying the event in persistence, but I'm not sure that's a great idea.

PS. Isn't PrePersist called too early? Shouldn't it be called during UoW->Commit?

Copy link
Contributor

There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
If you want to continue working on it, please leave a comment.

@github-actions github-actions bot added the Stale label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant