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

[Membership-backoffice] Reduce reliance on multiple specific but confusing class variables #14919

Merged
merged 1 commit into from
Oct 13, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

#14888 seeks to add auto_renew as a parameter on buildMembershipTypeValues
but on digging the results of that are not used much & could be used less.

It's only because we store them far away from where we use them that the relative silliness is kinda
hidden.

This PR removes one of the reliances.

Note that testSubmitRecurCompleteInstant is a good one for stepping through this

Before

Use of second class var just for this purpose

After

Re-use of generic var

Technical Details

@mattwire I'm reluctant to add $recurOnly to the function signature here https://github.com/civicrm/civicrm-core/pull/14888/files#diff-f43c8498e32f5b2d68ab27bcd243ca36L1555 beca
because I think we are adding complexity to a function we'd rather deprecate & by-pass. I propose this & a similar one to remove the use of $this->membershipTypeRenewalStatus (which is used once) instead

Comments

@civibot
Copy link

civibot bot commented Jul 30, 2019

(Standard links)

civicrm#14888 seeks to add auto_renew as a parameter on buildMembershipTypeValues
but on digging the results of that are not used much & could be used less.

It's only because we store them far away from where we use them that the relative silliness is kinda
hidden.

This PR removes one of the reliances.

Note that testSubmitRecurCompleteInstant is a good one for stepping through this
@eileenmcnaughton eileenmcnaughton changed the title Reduce reliance on multiple specific but confusing class variables [Membership-backoffice] Reduce reliance on multiple specific but confusing class variables Jul 30, 2019
@eileenmcnaughton
Copy link
Contributor Author

@mattwire did you look at this ? Good to merge?

@eileenmcnaughton
Copy link
Contributor Author

@mattwire should we merge or close this - you have changed your PR so it no longer touches this

@eileenmcnaughton
Copy link
Contributor Author

@mattwire can you check this

@mattwire mattwire merged commit 00363c7 into civicrm:master Oct 13, 2019
@eileenmcnaughton eileenmcnaughton deleted the mem_review branch October 13, 2019 16:39
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.

2 participants