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

Remove $ids as parameter for Membership::add #16192

Merged
merged 1 commit into from
Jan 2, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Jan 2, 2020

Overview

Removes $ids from Membership::add signature

Before

 public static function add(&$params) {

After

 public static function add(&$params, $ids = []) {

Technical Details

The only place it's called with is from create so we can handle userId there

Comments

We decided a very long time ago to get rid of the $ids pattern as it was not consistent enough to use

The only place it's called with  is from create so we can handle userId there
@civibot
Copy link

civibot bot commented Jan 2, 2020

(Standard links)

@civibot civibot bot added the master label Jan 2, 2020
@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 @mattwire we can finally remove $ids from add now...

@seamuslee001
Copy link
Contributor

Looks good to me

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 & from the code comments I can see another step

          // @todo stop passing empty $ids
          CRM_Member_BAO_Membership::create($params, $ids);

:-)

@seamuslee001 seamuslee001 merged commit 0724d51 into civicrm:master Jan 2, 2020
@seamuslee001 seamuslee001 deleted the mem_add branch January 2, 2020 23:36
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.

2 participants