-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
BAO - Noisily deprecate and stop using deprecated functions #25677
Conversation
(Standard links)
|
@colemanw a couple of tested places hitting this - eg. api_v3_SyntaxConformanceTest::testCustomDataGet with data set #12 ('Contribution') |
efc9aef
to
c8e7db1
Compare
@colemanw on the first one I rather thought we could drop the call to the silly |
c8e7db1
to
90d00f0
Compare
Thanks @eileenmcnaughton I think I may have fixed them all now. |
90d00f0
to
e5e4ae9
Compare
@eileenmcnaughton yep, 110 files with minor changes, and all tests passing :) |
@colemanw yeah - I need to work through the bits with more substantive change more carefully though - & it would go stale before I did since it's hard to even figure out which bits they are. My limit is about 10 files in a 'sitting' I've pulled off the easy tests to a separate PR since I can fully rely on jenkins for then & that will get it down a bit |
e5e4ae9
to
dcd2a57
Compare
@eileenmcnaughton now only 87 files :) |
@eileenmcnaughton 76 :) |
CRM/Admin/Form/Job.php
Outdated
@@ -189,7 +189,7 @@ public function postProcess() { | |||
CRM_Utils_System::flushCache(); | |||
|
|||
if ($this->_action & CRM_Core_Action::DELETE) { | |||
CRM_Core_BAO_Job::del($this->_id); | |||
CRM_Core_BAO_Job::del(['id' => $this->_id]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI this is not right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Fixed.
@eileenmcnaughton is this a reviewable number of changes? |
@colemanw I wind up checking it out one function at a time - ie confirm how one |
@eileenmcnaughton only 2 files left |
@colemanw yeah - I'm a bit torn about this one - it just feels wrong to catch the exception & quietly do nothing if the delete fails. I feel like it shouldn't occur - in which case we shouldn't catch it |
Ok, yea. The catch wasn't there before so let's leave it out. |
@eileenmcnaughton it's updated now |
test this please |
Overview
This noisily deprecates functions that have already been deprecated in the BAO, and ensures they are not called from any core code.
Before
A bunch of BAO functions superseded by
writeRecord
anddeleteRecord
, but only soft-deprecated and still called from some places.After
Now they're deprecated-er!
Technical Details
The
@deprecated
flag means that neither APIv3 nor APIv4 will call these functions, which means they're already unused by the API, so this removes the rest of the references to them and adds noisy deprecation which gets us a step closer to completely removing them.