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

Rename CRM_Contribute_BAO_ManagePremiums to CRM_Contribute_BAO_Product and deprecate CRM_Contribute_BAO_ManagePremiums #12474

Merged

Conversation

mattwire
Copy link
Contributor

Overview

Ref #12435 @eileenmcnaughton as discussed.

Before

CRM_Contribute_BAO_ManagePremiums extends from CRM_Contribute_DAO_Product and is actually the BAO_Product class but has a different name (so the API doesn't use it and any other DAO/BAO magic does not pick it up). Also, it's really confusing when working with that code!

After

CRM_Contribute_BAO_ManagePremiums is deprecated (and extends from the new CRM_Contribute_BAO_Product class).
The CRM_Contribute_BAO_Product class is a renamed copy of the CRM_Contribute_BAO_ManagePremiums class.

Technical Details

BAO object named properly for Product entity.

Comments

The "Premiums" code has not been touched for around 5 years so I don't think it is used very often!

@civibot
Copy link

civibot bot commented Jul 14, 2018

(Standard links)

…t and deprecate CRM_Contribute_BAO_ManagePremiums
@mattwire mattwire force-pushed the deprecate_bao_managepremiums branch from 2774ed1 to 37828d4 Compare July 14, 2018 17:52
@eileenmcnaughton
Copy link
Contributor

I went through the same refactor process locally & agree with these changes

I had some concerns about the seemingly additional change in there to stop overwriting on update but I now understand that the reason is that the standardisation of the BAO caused it to be newly picked up by the product api & hence tested via the syntaxconformance test - which meant that to keep parity the overwrites had to be fixed in the same PR

@eileenmcnaughton eileenmcnaughton merged commit a1ac1e4 into civicrm:master Jul 16, 2018
@mattwire mattwire deleted the deprecate_bao_managepremiums branch September 25, 2018 11:00
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.

3 participants