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

Move part of deprecated function loadRelatedObjects to calling functions #25267

Merged
merged 1 commit into from
Jan 2, 2023

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Move part of deprecated function loadRelatedObjects to calling functions

Before

It turns out $input is only used for the extraction of one value ($paymentProcessorID) - so we should pass only that value in

After

Only that value is passed in

Technical Details

I copied back the code to the calling functions - one of them could be further tidied up but I left that out of scope for this PR to keep it easy to review

Comments

This code was the very first function we started refactoring off the form layer with test support - still going... a decade later

@civibot
Copy link

civibot bot commented Jan 2, 2023

(Standard links)

@civibot civibot bot added the master label Jan 2, 2023
@@ -1833,7 +1833,22 @@ public static function transitionComponents($params) {
}
}

$contribution->loadRelatedObjects($input, $ids);
$paymentProcessorID = CRM_Utils_Array::value('payment_processor_id', $input, CRM_Utils_Array::value(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be using ?? instead of CRM_Utils_Value but I can see this is a straight extraction so ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattwire yeah - I avoided any cleanup in it

@seamuslee001 seamuslee001 merged commit 96a707e into civicrm:master Jan 2, 2023
@seamuslee001 seamuslee001 deleted the no_input branch January 2, 2023 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants