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) Remove constructors that do nothing #22544

Merged
merged 2 commits into from
Jan 17, 2022

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Jan 17, 2022

Overview

Removes unused code

Technical Details

Contrary to what some of the code comments say, these functions do nothing and return nothing.

Comments

Still fighting the good fight begun in #22417

@civibot
Copy link

civibot bot commented Jan 17, 2022

(Standard links)

@eileenmcnaughton
Copy link
Contributor

@colemanw looks like Jenkins isn't buying it

This pass-by-ref was causing `civilint` to crash and appears to be unnecessary and possibly harmful.
@colemanw
Copy link
Member Author

@eileenmcnaughton the civilint crash turned out to be a pre-exising condition unrelated to the class constructor. It was caused by a highly questionable pass-by-ref which I've removed.

* @return \CRM_Financial_DAO_FinancialTrxn
*/

/**
Copy link
Contributor

Choose a reason for hiding this comment

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

this will make @pradpnayak's PR stale - should be an easy tweak to that PR but it might come back depending on how the merge conflict fixing goes...

Copy link
Member Author

Choose a reason for hiding this comment

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

This PR is probably easier to rebase if you wanna merge that one first.

Copy link
Contributor

Choose a reason for hiding this comment

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

@colemanw #22400 is currently failed tests - I pulled out #22546 as a partial that renames the class & adds in the temporary placeholder class that extends the new 'real' class and removed the constructor. Hopefully that passes & has the changes from both PRs that touch this file (without having an answer on the failing tests at this stage)

Copy link
Contributor

Choose a reason for hiding this comment

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

@colemanw this got merged in the meantime - turns out the test error @pradpnayak was hitting is still present in the smallest version of the patch & I can't run the test myself to see why

@totten totten changed the title Remove constructors that do nothing (REF) Remove constructors that do nothing Jan 17, 2022
@seamuslee001 seamuslee001 merged commit 485427d into civicrm:master Jan 17, 2022
@seamuslee001 seamuslee001 deleted the deconstructor branch January 17, 2022 23:30
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