-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Standardize deletion mechanics across ~13 BAOs #22207
Conversation
(Standard links)
|
585abf0
to
39dfda3
Compare
39dfda3
to
23d14b5
Compare
@totten I'm not sure how to interpret the test output. Retest this please. |
23d14b5
to
df60ac3
Compare
591a29c
to
b6a27c6
Compare
@totten this now fixes all 13 noncompliant BAOs, but Jenkins seems to be choking on something and I think it's unrelated to this PR. " |
Retest this please |
Yeah, sounds good. This looks like it was a significant effort - requiring some cleanup in ~13 entities! I had some concern/hesitation about the size of the changes, and I want to leave a few notes on that. At a high level, moving logic from the create/delete methods to the hook-listeners poses a risk for contrib hook-listeners (because a contrib listener could find its relative placement changed in the flow of code). However, I think we should go ahead and merge. There are two major mitigating factors here:
So, yeah, let's merge - and branch for 5.45.beta soon. |
Overview
Refactors various BAO code to use new
deleteRecord
function and deprecate ad-hocdel()
functions. Gets the test in #22205 to pass.Note: This fixes some intra-alpha regressions with ManagedEntities. Following #21989 and #22068, it becomes mandatory to support the
hook_post
for APIv4-based cleanup of managed-entities. (This is true regardless of whether downstream's specific record is inserted via APIv4. It only matters if the entity declares support for APIv4 management.)Before
Less standardization of delete functions and the hooks they call.
After
More standardization.
Technical Details
Annotating a
BAO::del()
function as@deprecated
tells APIv4 not to use it. It will calldeleteRecord
instead.Entities failing the test in #22205:
CaseType
(false-positive, test needs fixing)Contact
ContactType
FinancialAccount
FinancialType
LocationType
MembershipStatus
MembershipType
MessageTemplate
OptionGroup
PaymentProcessor
PaymentProcessorType
RelationshipType
WordReplacement