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

Allow profiles to execute code before/after entity values are written #47

Merged

Conversation

dontub
Copy link
Contributor

@dontub dontub commented Jul 30, 2024

systopia-reference: 25860

@dontub dontub requested a review from jensschuppe July 30, 2024 13:59
@dontub dontub added enhancement New feature or request status:needs review Code needs review and testing. labels Jul 30, 2024
@dontub dontub force-pushed the allow-profile-code-before-and-after-entity-values-are-written branch from 182f992 to 5645b04 Compare July 30, 2024 14:02
Copy link
Contributor

@jensschuppe jensschuppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering whether Symfony events would have advantages over those profile methods …

@dontub
Copy link
Contributor Author

dontub commented Aug 2, 2024

Just wondering whether Symfony events would have advantages over those profile methods …

As the profile shall react here, events would add an additional layer that would make the flow more complex. I think events make sense when components shall react that are not known to the component dispatching the event. Nevertheless, I think it's worth considering if additionally dispatching events make sense here.

@dontub
Copy link
Contributor Author

dontub commented Aug 5, 2024

Just thought about passing the same event object to the profile methods that is (not yet) given to the event dispatcher.

Base automatically changed from execute-delete-and-submit-actions-in-transaction to master August 9, 2024 12:52
@dontub dontub merged commit 1435896 into master Sep 4, 2024
9 checks passed
@dontub dontub deleted the allow-profile-code-before-and-after-entity-values-are-written branch September 4, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request status:needs review Code needs review and testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants