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

[REF] simplify interaction with objects in complete order #18385

Merged
merged 1 commit into from
Sep 7, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Minor code simplification

Before

$paymentProcessorID needs to be in $objects AND $contribution->_relatedObjects

After

Only objects accessed

Technical Details

Per #18382 this line seems to be heavily tested so
& per the test we can use the 'already calculated value' for payment_processor_id rather than look
it up in yet another place.

This adds a query but in most cases queries can be removed before calling this function as
the various objects are not really accessed anymore (apart from the few lines just above this)

Comments

@seamuslee001

Per civicrm#18382 this line seems to be heavily tested so
& per the test we can use the 'already calculated value' for payment_processor_id rather than look
it up in yet another place.

This adds a query but in most cases queries can be removed before calling this function as
the various objects are not really accessed anymore (apart from the few lines just above this)
@civibot
Copy link

civibot bot commented Sep 6, 2020

(Standard links)

@civibot civibot bot added the master label Sep 6, 2020
@mattwire mattwire merged commit 77ca888 into civicrm:master Sep 7, 2020
@eileenmcnaughton eileenmcnaughton deleted the pay branch September 7, 2020 19:42
@eileenmcnaughton
Copy link
Contributor Author

@mattwire looks like we missed a trick on this one - fortunately @demeritcowboy picked it up

#18454

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