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] Replace deprecated code call #20409

Merged
merged 1 commit into from
May 25, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

[REF] Replace deprecated code call

Before

Deprecated fn call

CRM_Core_DAO::triggerRebuild()

After

Civi::service('sql_triggers')->rebuild()

Technical Details

I hadn't made this change before because the Civi::service() facade means it takes a bit of effort to find the function being called & verify the signature is in fact the same - however I did it this time & it is.

image

Perhaps as a follow up we should rip through & do all the others - I'm tempted to perhaps add a comment to say what the actually called function is before each line but I guess in theory the Civi facade is dev-friendly

Also I'm very tempted to rip out the check to the url retrieve - CRM_Utils_Request::retrieve('triggerRebuild', 'Boolean', CRM_Core_DAO::$_nullObject, FALSE, 0, 'GET') = this seems to me like an undocumented feature that was used by devs when developing the triggers but which devs would do in other ways now...

Comments

@civibot
Copy link

civibot bot commented May 25, 2021

(Standard links)

@civibot civibot bot added the master label May 25, 2021
@eileenmcnaughton eileenmcnaughton merged commit acfd0bc into civicrm:master May 25, 2021
@eileenmcnaughton eileenmcnaughton deleted the dep branch May 25, 2021 02:47
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