-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[SoftDeleteable] Add option to enable or disable handling of postFlush
#2958
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
Conversation
Another option would be to make the |
Yes, why not. But I would then suggest that the default is "disabled" because it is a breaking change to have it enabled. |
postFlush
Ok, let's try it that way then, PR updated. |
postFlush
postFlush
I wish I had merge rights to help move this forward, but my two cents. On the listener, it probably doesn't need the constructor parameter and the setter for the option, just the setter would be fine (and consistent with all the other bits that can be configured on a listener). If it's possible, having some kind of failing test case over the exact issues that the changes here cover would be really helpful going forward because the changes in behavior that this post-flush change made starts getting deep into the internals of how the listener interacts with the object managers, and it's probably something that shouldn't be accidentally changed in a new way that breaks things later. |
@mbabker I can remove it if needed. I included it because the
@mbabker The test I added fails when the new behavior is enabled. |
As far as I can tell this updated merge request modifies and enhances the test case submitted by the author of the original merge request in order to fit the new scheme and adds one further test which bails out if the old pre-#2930 behaviour is not met. The exact documented issues that this merge request covers are detailed in the first comment of this PR. If one would like to avoid to dig "deep into the internals" then #2930 should just be reverted. |
|
||
## [Unreleased] | ||
### Added | ||
- SoftDeleteable: Add option to enable or disable handling of the `postFlush` event (#2958) |
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.
IIUC, this PR should also have at least an entry for the Changed
and Fixed
sections, because the added option changes the way the previous fix behaves, while fix the issues mentioned in the description.
Could you please confirm?
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.
Hi. Yes you're right. I've updated the changelog.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2958 +/- ##
==========================================
+ Coverage 78.43% 78.55% +0.12%
==========================================
Files 168 169 +1
Lines 8806 8833 +27
==========================================
+ Hits 6907 6939 +32
+ Misses 1899 1894 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thank you @HypeMC! |
Closes #2956
As mentioned in this discussion, the original PR seems to have introduced a few new issues: #2942, #2947, and #2955.
Maybe it makes sense to revert it for now, at least until there's a fix for the original problem that doesn't cause new ones. At the moment, it feels like it's creating more trouble than it's solving.