Documentation

Deprecated

Table of Contents

api/api.php
api/v3/ActivityType.php
api/v3/Case.php
api/v3/Constant.php
api/v3/Contribution/Transact.php
api/v3/CustomField.php
api/v3/Generic/Update.php
api/v3/GroupContact.php
api/v3/Mailing.php
api/v3/MailingGroup.php
api/v3/MembershipStatus.php
api/v3/Note.php
api/v3/Profile.php
api/v3/Setting.php
api/v3/SurveyRespondant.php
api/v3/utils.php
bin/ContributionProcessor.php
Civi/ActionSchedule/Events.php
Civi/ActionSchedule/MappingBase.php
Civi/Angular/AngularLoader.php
Civi/Angular/Page/Modules.php
Civi/API/Events.php
Civi/API/Kernel.php
Civi/API/Subscriber/DynamicFKAuthorization.php
Civi/Api4/Action/Entity/Get.php
Civi/Api4/Event/CreateApi4RequestEvent.php
Civi/Api4/Event/Events.php
Civi/Api4/Event/Subscriber/Generic/PreSaveSubscriber.php
Civi/Api4/Event/Subscriber/IsCurrentSubscriber.php
Civi/Api4/Generic/AbstractSaveAction.php
Civi/Api4/Generic/BasicGetFieldsAction.php
Civi/Api4/Generic/Traits/IsCurrentTrait.php
Civi/Api4/Utils/CoreUtil.php
Civi/Core/Event/GenericHookEvent.php
Civi/Core/Event/SystemInstallEvent.php
Civi/Core/Lock/LockInterface.php
Civi/Core/Lock/NullLock.php
Civi/Core/SettingsManager.php
Civi/Test/Api3TestTrait.php
Civi/Token/Events.php
Civi/Token/TokenException.php
Civi/WorkflowMessage/Traits/ReflectiveWorkflowTrait.php
CRM/ACL/API.php
CRM/ACL/BAO/ACL.php
CRM/ACL/BAO/ACLEntityRole.php
CRM/ACL/BAO/EntityRole.php
CRM/Activity/BAO/Activity.php
CRM/Admin/Form/Setting/Case.php
CRM/Admin/Form/Setting/Component.php
CRM/Admin/Form/Setting/Date.php
CRM/Admin/Form/Setting/Debugging.php
CRM/Admin/Form/Setting/Localization.php
CRM/Admin/Form/Setting/Mapping.php
CRM/Admin/Form/Setting/Miscellaneous.php
CRM/Admin/Form/Setting/Smtp.php
CRM/Admin/Form/Setting/Url.php
CRM/Admin/Form/Setting.php
CRM/Badge/BAO/Layout.php
CRM/Batch/BAO/Batch.php
CRM/Batch/BAO/EntityBatch.php
CRM/Batch/Page/AJAX.php
CRM/Campaign/BAO/Campaign.php
CRM/Campaign/BAO/Survey.php
CRM/Campaign/Form/Campaign.php
CRM/Campaign/Form/Survey/TabHeader.php
CRM/Case/BAO/Case.php
CRM/Case/BAO/CaseContact.php
CRM/Case/BAO/CaseType.php
CRM/Case/Form/Case.php
CRM/Case/XMLProcessor.php
CRM/Contact/BAO/Contact/Permission.php
CRM/Contact/BAO/Contact/Utils.php
CRM/Contact/BAO/Contact.php
CRM/Contact/BAO/ContactType.php
CRM/Contact/BAO/Group.php
CRM/Contact/BAO/GroupContact.php
CRM/Contact/BAO/Query.php
CRM/Contact/BAO/Relationship.php
CRM/Contact/BAO/RelationshipType.php
CRM/Contact/BAO/SavedSearch.php
CRM/Contact/BAO/SubscriptionHistory.php
CRM/Contact/Form/CustomData.php
CRM/Contact/Form/Edit/CustomData.php
CRM/Contact/Form/Location.php
CRM/Contact/Form/Task/EmailCommon.php
CRM/Contact/Form/Task/Label.php
CRM/Contact/Form/Task/PDFLetterCommon.php
CRM/Contact/Form/Task/SMSCommon.php
CRM/Contact/Import/MetadataTrait.php
CRM/Contact/Import/Parser/Contact.php
CRM/Contact/Page/AJAX.php
CRM/Contact/Page/View/Relationship.php
CRM/Contribute/BAO/Contribution/Utils.php
CRM/Contribute/BAO/Contribution.php
CRM/Contribute/BAO/ContributionPage.php
CRM/Contribute/BAO/ContributionRecur.php
CRM/Contribute/BAO/ContributionSoft.php
CRM/Contribute/BAO/Premium.php
CRM/Contribute/BAO/Product.php
CRM/Contribute/Form/AbstractEditPayment.php
CRM/Contribute/Form/AdditionalInfo.php
CRM/Contribute/Form/AdditionalPayment.php
CRM/Contribute/Form/Contribution/Confirm.php
CRM/Contribute/Form/Contribution/Main.php
CRM/Contribute/Form/Contribution.php
CRM/Contribute/Form/ContributionBase.php
CRM/Contribute/Form/ContributionRecur.php
CRM/Core/BAO/ActionSchedule.php
CRM/Core/BAO/Address.php
CRM/Core/BAO/Block.php
CRM/Core/BAO/Cache.php
CRM/Core/BAO/ConfigSetting.php
CRM/Core/BAO/CustomField.php
CRM/Core/BAO/CustomGroup.php
CRM/Core/BAO/CustomOption.php
CRM/Core/BAO/Discount.php
CRM/Core/BAO/Domain.php
CRM/Core/BAO/Email.php
CRM/Core/BAO/EntityTag.php
CRM/Core/BAO/Extension.php
CRM/Core/BAO/File.php
CRM/Core/BAO/FinancialTrxn.php
CRM/Core/BAO/IM.php
CRM/Core/BAO/Job.php
CRM/Core/BAO/LocationType.php
CRM/Core/BAO/MailSettings.php
CRM/Core/BAO/Mapping.php
CRM/Core/BAO/MessageTemplate.php
CRM/Core/BAO/Navigation.php
CRM/Core/BAO/Note.php
CRM/Core/BAO/OpenID.php
CRM/Core/BAO/OptionGroup.php
CRM/Core/BAO/OptionValue.php
CRM/Core/BAO/Phone.php
CRM/Core/BAO/PreferencesDate.php
CRM/Core/BAO/RecurringEntity.php
CRM/Core/BAO/Setting.php
CRM/Core/BAO/Tag.php
CRM/Core/BAO/UFField.php
CRM/Core/BAO/UFGroup.php
CRM/Core/BAO/UFJoin.php
CRM/Core/BAO/UFMatch.php
CRM/Core/BAO/Website.php
CRM/Core/BAO/WordReplacement.php
CRM/Core/CodeGen/Schema.php
CRM/Core/Component.php
CRM/Core/Config.php
CRM/Core/Controller.php
CRM/Core/DAO/AllCoreTables.php
CRM/Core/DAO.php
CRM/Core/Error.php
CRM/Core/Exception.php
CRM/Core/Form/Date.php
CRM/Core/Form/Task/PDFLetterCommon.php
CRM/Core/Form.php
CRM/Core/I18n.php
CRM/Core/JobManager.php
CRM/Core/Lock.php
CRM/Core/OptionGroup.php
CRM/Core/Page/EntityPageTrait.php
CRM/Core/Page.php
CRM/Core/Payment/BaseIPN.php
CRM/Core/Payment/PayPalImpl.php
CRM/Core/Payment.php
CRM/Core/PseudoConstant.php
CRM/Core/SelectValues.php
CRM/Core/Smarty/plugins/function.sectionTotal.php
CRM/Core/SmartyCompatibility.php
CRM/Custom/Form/CustomData.php
CRM/Custom/Form/Group.php
CRM/Custom/Page/AJAX.php
CRM/Dedupe/BAO/DedupeRuleGroup.php
CRM/Dedupe/BAO/Exception.php
CRM/Dedupe/BAO/Rule.php
CRM/Dedupe/BAO/RuleGroup.php
CRM/Dedupe/Finder.php
CRM/Event/BAO/Event.php
CRM/Event/BAO/Participant.php
CRM/Event/BAO/ParticipantStatusType.php
CRM/Event/Form/EventFees.php
CRM/Event/Form/ManageEvent/EventInfo.php
CRM/Event/Form/ManageEvent/TabHeader.php
CRM/Event/Form/Participant.php
CRM/Event/Form/ParticipantFeeSelection.php
CRM/Event/Form/Registration/Register.php
CRM/Event/Form/Registration.php
CRM/Event/Form/Task/Batch.php
CRM/Event/PseudoConstant.php
CRM/Extension/Info.php
CRM/Financial/BAO/EntityFinancialAccount.php
CRM/Financial/BAO/FinancialAccount.php
CRM/Financial/BAO/FinancialItem.php
CRM/Financial/BAO/FinancialType.php
CRM/Financial/BAO/Payment.php
CRM/Financial/BAO/PaymentProcessor.php
CRM/Financial/BAO/PaymentProcessorType.php
CRM/Financial/Form/SalesTaxTrait.php
CRM/Financial/Page/AJAX.php
CRM/Import/Form/MapField.php
CRM/Import/ImportProcessor.php
CRM/Invoicing/Utils.php
CRM/Mailing/BAO/Component.php
CRM/Mailing/BAO/Mailing.php
CRM/Mailing/BAO/MailingAB.php
CRM/Mailing/BAO/MailingComponent.php
CRM/Mailing/BAO/MailingJob.php
CRM/Mailing/Event/BAO/MailingEventBounce.php
CRM/Mailing/Event/BAO/MailingEventDelivered.php
CRM/Mailing/Event/BAO/MailingEventQueue.php
CRM/Member/BAO/Membership.php
CRM/Member/BAO/MembershipBlock.php
CRM/Member/BAO/MembershipLog.php
CRM/Member/BAO/MembershipPayment.php
CRM/Member/BAO/MembershipStatus.php
CRM/Member/BAO/MembershipType.php
CRM/Member/Form/Membership.php
CRM/Member/Form.php
CRM/Member/Page/Tab.php
CRM/PCP/BAO/PCP.php
CRM/PCP/BAO/PCPBlock.php
CRM/Pledge/BAO/Pledge.php
CRM/Pledge/BAO/PledgeBlock.php
CRM/Pledge/BAO/PledgePayment.php
CRM/Price/BAO/LineItem.php
CRM/Price/BAO/PriceField.php
CRM/Price/BAO/PriceFieldValue.php
CRM/Price/BAO/PriceSet.php
CRM/Queue/Queue.php
CRM/Report/BAO/ReportInstance.php
CRM/Report/Form.php
CRM/SMS/BAO/SmsProvider.php
CRM/SMS/Provider.php
CRM/UF/Page/Field.php
CRM/UF/Page/Group.php
CRM/Utils/Array.php
CRM/Utils/Cache/CacheWrapper.php
CRM/Utils/Cache/Interface.php
CRM/Utils/Date.php
CRM/Utils/File.php
CRM/Utils/Hook.php
CRM/Utils/JSON.php
CRM/Utils/Pager.php
CRM/Utils/Recent.php
CRM/Utils/Request.php
CRM/Utils/REST.php
CRM/Utils/Rule.php
CRM/Utils/SoapServer.php
CRM/Utils/SQL/TempTable.php
CRM/Utils/SQL.php
CRM/Utils/String.php
CRM/Utils/System/Base.php
CRM/Utils/System/DrupalBase.php
CRM/Utils/System.php
CRM/Utils/Time.php
CRM/Utils/Token.php
ext/afform/core/Civi/Api4/Action/Afform/Submit.php
ext/afform/core/CRM/Afform/AfformScanner.php
ext/authx/tests/phpunit/Civi/Authx/AbstractFlowsTest.php
ext/civigrant/CRM/Grant/BAO/Grant.php
ext/eventcart/CRM/Event/Cart/Form/Cart.php
ext/flexmailer/src/Listener/BaseListener.php
ext/flexmailer/src/Services.php
ext/tellafriend/CRM/Friend/BAO/Friend.php
tests/phpunit/api/v4/Mock/MockV4ReflectionGrandchild.php
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php
tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php

api.php

Line Element Reason
27 civicrm_api()

Not recommended for new code but ok for existing code to continue using.

Calling civicrm_api() is functionally identical to civicrm_api3() or civicrm_api4() except:

  1. It requires $params['version'].
  2. It catches exceptions and returns an array like ['is_error' => 1, 'error_message' => ...]. This is disfavored for typical business-logic/hooks/forms/etc. However, if an existing caller handles civicrm_api()-style errors, then there is no functional benefit to reworking it.
299 _civicrm_api_get_entity_name_from_camel()

ActivityType.php

Line Element Reason
27 _civicrm_api3_activity_type_deprecation()

api notice

40 civicrm_api3_activity_type_get()
  • use the getoptions action instead
56 civicrm_api3_activity_type_create()

use the OptionValue api instead

101 civicrm_api3_activity_type_delete()

use OptionValue api

Case.php

Line Element Reason
481 _civicrm_api3_case_deprecation()

api notice

501 civicrm_api3_case_update()

Update a specified case. Use civicrm_api3_case_create() instead.

Constant.php

Line Element Reason
27 _civicrm_api3_constant_deprecation()

api notice

83 civicrm_api3_constant_get()

as of CiviCRM 4.4. It's recommended to use the api getoptions action instead

Transact.php

Line Element Reason
41 civicrm_api3_contribution_transact()

CustomField.php

Line Element Reason
220 _civicrm_api3_custom_field_validate_field()

Update.php

Line Element Reason
39 civicrm_api3_generic_update()

GroupContact.php

Line Element Reason
132 civicrm_api3_group_contact_delete()
174 civicrm_api3_group_contact_pending()
270 civicrm_api3_group_contact_update_status()
  • this should be part of create but need to know we aren't missing something
292 _civicrm_api3_group_contact_deprecation()

api notice

Mailing.php

Line Element Reason
338 civicrm_api3_mailing_event_confirm()
349 _civicrm_api3_mailing_deprecation()

api notice

417 civicrm_api3_mailing_event_forward()

it is highly unlikely this function is ever used because to use it someone needs to forward an email by clicking on a link rather than.. forwarding the email. Even the links are probably never generated.

Also - it would be poor email server reputation management. Function is nasty but can die with apiv4 whenever that is (along with surveyRespondant)

MailingGroup.php

Line Element Reason
26 _civicrm_api3_mailing_group_deprecation()

api notice

45 civicrm_api3_mailing_group_event_unsubscribe()
58 civicrm_api3_mailing_group_event_domain_unsubscribe()
72 civicrm_api3_mailing_group_event_resubscribe()
85 civicrm_api3_mailing_group_event_subscribe()

MembershipStatus.php

Line Element Reason
71 civicrm_api3_membership_status_update()
  • should just use create

Note.php

Line Element Reason
99 civicrm_api3_note_tree_get()

Profile.php

Line Element Reason
328 civicrm_api3_profile_set()
  • calling this function directly is deprecated as 'set' is not a clear action use submit
348 civicrm_api3_profile_apply()
  • appears to be an internal function - should not be accessible via api Provide formatted values for profile fields.
759 _civicrm_api3_profile_deprecation()

api notice

Setting.php

Line Element Reason
215 civicrm_api3_setting_fill()

SurveyRespondant.php

Line Element Reason
27 _civicrm_api3_survey_respondant_deprecation()

api notice

41 civicrm_api3_survey_respondant_get()
  • api currently not supported
75 civicrm_api3_survey_respondant_count()
  • api currently not supported

utils.php

Line Element Reason
618 _civicrm_api3_dao_set_filter()

DAO based retrieval is being phased out.

950 _civicrm_api3_dao_to_array()
  • DAO based retrieval is being phased out.

ContributionProcessor.php

Line Element Reason
402 CiviContributeProcessor::processAPIContribution()

function.

This function has probably been defunct for quite a long time.

Events.php

Line Element Reason
10 Events::MAPPINGS
  • You may simply use the event name directly. dev/core#1744
16 Events::MAILING_QUERY
  • You may simply use the event name directly. dev/core#1744

MappingBase.php

Line Element Reason
55 MappingBase::getEntity()

AngularLoader.php

Line Element Reason
99 AngularLoader::load()

Modules.php

Line Element Reason
32 Modules::run()

Events.php

Line Element Reason
28 Events::AUTHORIZE
  • You may simply use the event name directly. dev/core#1744
34 Events::RESOLVE
  • You may simply use the event name directly. dev/core#1744
40 Events::PREPARE
  • You may simply use the event name directly. dev/core#1744
48 Events::RESPOND
  • You may simply use the event name directly. dev/core#1744
56 Events::EXCEPTION
  • You may simply use the event name directly. dev/core#1744

Kernel.php

Line Element Reason
57 Kernel::run()

DynamicFKAuthorization.php

Line Element Reason
38 DynamicFKAuthorization

APIv3 only.

Given an entity which dynamically attaches itself to another entity, determine if one has permission to the other entity.

Example: Suppose one tries to manipulate a File which is attached to a Mailing. DynamicFKAuthorization will enforce permissions on the File by imitating the permissions of the Mailing.

Note: This enforces a constraint: all matching API calls must define "id" (e.g. for the file) or "entity_table+entity_id" or "field_name+entity_id".

Note: The permission guard does not exactly authorize the request, but it may veto authorization.

Get.php

Line Element Reason
28 Get::$includeCustom

CreateApi4RequestEvent.php

Line Element Reason
19 CreateApi4RequestEvent

Events.php

Line Element Reason
18 Events
24 Events::SCHEMA_MAP_BUILD

Just use the string instead of the constant when listening for this event

PreSaveSubscriber.php

Line Element Reason
23 PreSaveSubscriber

IsCurrentSubscriber.php

Line Element Reason
23 IsCurrentSubscriber

AbstractSaveAction.php

Line Element Reason
125 AbstractSaveAction::getIdField()

BasicGetFieldsAction.php

Line Element Reason
71 BasicGetFieldsAction::$includeCustom

IsCurrentTrait.php

Line Element Reason
18 IsCurrentTrait
32 IsCurrentTrait::getCurrent()
41 IsCurrentTrait::setCurrent()
26 IsCurrentTrait::$current

CoreUtil.php

Line Element Reason
227 CoreUtil::isCustomEntity()

since 5.71 will be removed around 5.81

GenericHookEvent.php

Line Element Reason
174 GenericHookEvent::getReturnValues()
183 GenericHookEvent::addReturnValues()
95 GenericHookEvent::$returnValues

SystemInstallEvent.php

Line Element Reason
25 SystemInstallEvent::EVENT_NAME
  • You may simply use the event name directly. dev/core#1744

LockInterface.php

Line Element Reason
41 LockInterface::isFree()

Not supported by some locking strategies. If you need to poll, better to use acquire(0).

NullLock.php

Line Element Reason
65 NullLock::isFree()

Not supported by some locking strategies. If you need to poll, better to use acquire(0).

SettingsManager.php

Line Element Reason
147 SettingsManager::useDefaults()

Api3TestTrait.php

Line Element Reason
152 Api3TestTrait::callAPIAndDocument()

Events.php

Line Element Reason
10 Events::TOKEN_REGISTER
  • You may simply use the event name directly. dev/core#1744
16 Events::TOKEN_EVALUATE
  • You may simply use the event name directly. dev/core#1744
22 Events::TOKEN_RENDER
  • You may simply use the event name directly. dev/core#1744

TokenException.php

Line Element Reason
9 TokenException

Unused - non-compliant namespace -see https://github.com/civicrm/civicrm-core/pull/25634

ReflectiveWorkflowTrait.php

Line Element Reason
52 ReflectiveWorkflowTrait::getGroupName()

It is not recommended that new things depend on the group-name. However, the plumbing still passes-through the group-name.

API.php

Line Element Reason
44 CRM_ACL_API::check()

ACL.php

Line Element Reason
155 CRM_ACL_BAO_ACL::create()
166 CRM_ACL_BAO_ACL::retrieve()
177 CRM_ACL_BAO_ACL::setIsActive()
  • this bypasses hooks.
190 CRM_ACL_BAO_ACL::check()
411 CRM_ACL_BAO_ACL::del()

ACLEntityRole.php

Line Element Reason
41 CRM_ACL_BAO_ACLEntityRole::create()
52 CRM_ACL_BAO_ACLEntityRole::retrieve()
63 CRM_ACL_BAO_ACLEntityRole::setIsActive()
  • this bypasses hooks.
75 CRM_ACL_BAO_ACLEntityRole::del()

EntityRole.php

Line Element Reason
21 CRM_ACL_BAO_EntityRole

Activity.php

Line Element Reason
68 CRM_Activity_BAO_Activity::retrieve()

Fetch object based on array of properties.

923 CRM_Activity_BAO_Activity::createEmailActivity()
1000 CRM_Activity_BAO_Activity::sendEmail()
1173 CRM_Activity_BAO_Activity::sendSMS()

since 5.71.

This function has no core usage. There is some non-core usage. At some point we should add a suitable api & noisily deprecate this / set an tentative removal date.

1368 CRM_Activity_BAO_Activity::sendMessage()
1438 CRM_Activity_BAO_Activity::getContactActivity()
  • use the api instead.

Get the Activities of a target contact.

Case.php

Line Element Reason
31 CRM_Admin_Form_Setting_Case::$_settings
  • do not add new settings here - the page to display settings on should be defined in the setting metadata.

Component.php

Line Element Reason
32 CRM_Admin_Form_Setting_Component::$_settings
  • do not add new settings here - the page to display settings on should be defined in the setting metadata.

Date.php

Line Element Reason
31 CRM_Admin_Form_Setting_Date::$_settings
  • do not add new settings here - the page to display settings on should be defined in the setting metadata.

Debugging.php

Line Element Reason
31 CRM_Admin_Form_Setting_Debugging::$_settings
  • do not add new settings here - the page to display settings on should be defined in the setting metadata.

Localization.php

Line Element Reason
34 CRM_Admin_Form_Setting_Localization::$_settings
  • do not add new settings here - the page to display settings on should be defined in the setting metadata.

Mapping.php

Line Element Reason
31 CRM_Admin_Form_Setting_Mapping::$_settings
  • do not add new settings here - the page to display settings on should be defined in the setting metadata.

Miscellaneous.php

Line Element Reason
31 CRM_Admin_Form_Setting_Miscellaneous::$_settings
  • do not add new settings here - the page to display settings on should be defined in the setting metadata.

Smtp.php

Line Element Reason
32 CRM_Admin_Form_Setting_Smtp::$_settings
  • do not add new settings here - the page to display settings on should be defined in the setting metadata.

Url.php

Line Element Reason
31 CRM_Admin_Form_Setting_Url::$_settings
  • do not add new settings here - the page to display settings on should be defined in the setting metadata.

Setting.php

Line Element Reason
33 CRM_Admin_Form_Setting::$_settings
  • do not add new settings here - the page to display settings on should be defined in the setting metadata.

Layout.php

Line Element Reason
28 CRM_Badge_BAO_Layout::retrieve()
38 CRM_Badge_BAO_Layout::setIsActive()
  • this bypasses hooks.
90 CRM_Badge_BAO_Layout::del()

Batch.php

Line Element Reason
41 CRM_Batch_BAO_Batch::create()
78 CRM_Batch_BAO_Batch::retrieve()

EntityBatch.php

Line Element Reason
65 CRM_Batch_BAO_EntityBatch::del()

AJAX.php

Line Element Reason
41 CRM_Batch_Page_AJAX::getBatchList()

Campaign.php

Line Element Reason
26 CRM_Campaign_BAO_Campaign::create()
71 CRM_Campaign_BAO_Campaign::del()
88 CRM_Campaign_BAO_Campaign::retrieve()
276 CRM_Campaign_BAO_Campaign::isCampaignEnable()
321 CRM_Campaign_BAO_Campaign::setIsActive()
  • this bypasses hooks.

Survey.php

Line Element Reason
29 CRM_Campaign_BAO_Survey::retrieve()
40 CRM_Campaign_BAO_Survey::create()
149 CRM_Campaign_BAO_Survey::getSurveyCustomGroups()

since 5.71 will be removed around 5.85.

188 CRM_Campaign_BAO_Survey::setIsActive()
  • this bypasses hooks.
200 CRM_Campaign_BAO_Survey::del()

Campaign.php

Line Element Reason
67 CRM_Campaign_Form_Campaign::$_campaignId

use getCampaignID()

TabHeader.php

Line Element Reason
21 CRM_Campaign_Form_Survey_TabHeader

since 5.71 will be removed around 5.77

32 CRM_Campaign_Form_Survey_TabHeader::build()

since 5.71 will be removed around 5.77

57 CRM_Campaign_Form_Survey_TabHeader::process()

since 5.71 will be removed around 5.77

122 CRM_Campaign_Form_Survey_TabHeader::reset()

since 5.71 will be removed around 5.77

135 CRM_Campaign_Form_Survey_TabHeader::getCurrentTab()

since 5.71 will be removed around 5.77

163 CRM_Campaign_Form_Survey_TabHeader::getNextTab()

since 5.71 will be removed around 5.77

Case.php

Line Element Reason
37 CRM_Case_BAO_Case::enabled()
2977 CRM_Case_BAO_Case::buildOptions()

CaseContact.php

Line Element Reason
31 CRM_Case_BAO_CaseContact::create()

CaseType.php

Line Element Reason
443 CRM_Case_BAO_CaseType::del()

Case.php

Line Element Reason
100 CRM_Case_Form_Case::$_caseStatusId

This is inconsistently set & likely to be replaced by a local variable or getter.

XMLProcessor.php

Line Element Reason
47 CRM_Case_XMLProcessor::mungeCaseType()

Permission.php

Line Element Reason
32 CRM_Contact_BAO_Contact_Permission::setUseTemporaryTable()
43 CRM_Contact_BAO_Contact_Permission::getUseTemporaryTable()
24 CRM_Contact_BAO_Contact_Permission::$useTempTable

Utils.php

Line Element Reason
474 CRM_Contact_BAO_Contact_Utils::buildOnBehalfForm()

since 5.74 will be removed around 5.80

Contact.php

Line Element Reason
787 CRM_Contact_BAO_Contact::retrieve()

This is called from a few places but creates rather than solves complexity.

2496 CRM_Contact_BAO_Contact::getValues()

avoid this function, no planned removed at this stage as there are still core callers.

3306 CRM_Contact_BAO_Contact::buildOptions()

ContactType.php

Line Element Reason
27 CRM_Contact_BAO_ContactType::retrieve()
391 CRM_Contact_BAO_ContactType::del()
494 CRM_Contact_BAO_ContactType::add()
505 CRM_Contact_BAO_ContactType::setIsActive()
  • this bypasses hooks.

Group.php

Line Element Reason
29 CRM_Contact_BAO_Group::retrieve()
340 CRM_Contact_BAO_Group::create()

Create a new group.

352 CRM_Contact_BAO_Group::createSmartGroup()
378 CRM_Contact_BAO_Group::setIsActive()
  • this bypasses hooks.

GroupContact.php

Line Element Reason
35 CRM_Contact_BAO_GroupContact::add()
516 CRM_Contact_BAO_GroupContact::create()
533 CRM_Contact_BAO_GroupContact::isContactInGroup()
749 CRM_Contact_BAO_GroupContact::buildOptions()

Query.php

Line Element Reason
4602 CRM_Contact_BAO_Query::apiQuery()

since 5.71 - will be removed after all core usages are fully removed.

Relationship.php

Line Element Reason
361 CRM_Contact_BAO_Relationship::dataExists()
554 CRM_Contact_BAO_Relationship::del()
714 CRM_Contact_BAO_Relationship::checkValidRelationship()
1809 CRM_Contact_BAO_Relationship::getContactRelationshipSelector()

since 5.68. Will be removed around 5.74.

Only-used-by-user-dashboard.

1954 CRM_Contact_BAO_Relationship::getColumnHeaders()

since 5.68. Will be removed around 5.74.

Only-used-by-user-dashboard.

2010 CRM_Contact_BAO_Relationship::buildOptions()

RelationshipType.php

Line Element Reason
29 CRM_Contact_BAO_RelationshipType::retrieve()
39 CRM_Contact_BAO_RelationshipType::setIsActive()
  • this bypasses hooks.
49 CRM_Contact_BAO_RelationshipType::add()
60 CRM_Contact_BAO_RelationshipType::del()

SavedSearch.php

Line Element Reason
36 CRM_Contact_BAO_SavedSearch::retrieve()
228 CRM_Contact_BAO_SavedSearch::getName()
237 CRM_Contact_BAO_SavedSearch::create()

SubscriptionHistory.php

Line Element Reason
28 CRM_Contact_BAO_SubscriptionHistory::create()

CustomData.php

Line Element Reason
168 CRM_Contact_Form_CustomData::preProcessCustomData()

see https://github.com/civicrm/civicrm-core/pull/29241 for preferred approach - basically

  1. at the tpl layer use CRM/common/customDataBlock.tpl
  2. to make the fields available for postProcess if ($this->isSubmitted()) { $this->addCustomDataFieldsToForm('FinancialAccount'); }
  3. pass getSubmittedValues() to CRM_Core_BAO_CustomField::postProcess($this->getSubmittedValues(), $this->_id, 'FinancialAccount'); to ensure any money or number fields are handled for localisation

CustomData.php

Line Element Reason
23 CRM_Contact_Form_Edit_CustomData

since 5.73 will be removed around 5.85

34 CRM_Contact_Form_Edit_CustomData::preProcess()

since 5.73 will be removed around 5.85

59 CRM_Contact_Form_Edit_CustomData::buildQuickForm()

since 5.73 will be removed around 5.85

94 CRM_Contact_Form_Edit_CustomData::setDefaultValues()

since 5.73 will be removed around 5.85

Location.php

Line Element Reason
19 CRM_Contact_Form_Location

in CiviCRM 5.66, will be removed around CiviCRM 5.76.

27 CRM_Contact_Form_Location::buildQuickForm()

in CiviCRM 5.66, will be removed around CiviCRM 5.76.

EmailCommon.php

Line Element Reason
38 CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress()

Label.php

Line Element Reason
225 CRM_Contact_Form_Task_Label::tokenIsFound()

since 5.78 will be removed around 5.84

PDFLetterCommon.php

Line Element Reason
23 CRM_Contact_Form_Task_PDFLetterCommon

since 5.59 will be removed around 5.89.

SMSCommon.php

Line Element Reason
23 CRM_Contact_Form_Task_SMSCommon

since 5.71 will be removed around 5.77.

39 CRM_Contact_Form_Task_SMSCommon::preProcessProvider()

since 5.71 will be removed around 5.77.

79 CRM_Contact_Form_Task_SMSCommon::buildQuickForm()

since 5.71 will be removed around 5.77.

325 CRM_Contact_Form_Task_SMSCommon::postProcess()

since 5.71 will be removed around 5.77.

MetadataTrait.php

Line Element Reason
11 CRM_Contact_Import_MetadataTrait

since 5.69 will be removed around 5.75

20 CRM_Contact_Import_MetadataTrait::getContactImportMetadata()

since 5.69 will be removed around 5.75

71 CRM_Contact_Import_MetadataTrait::getRelationships()

since 5.69 will be removed around 5.75

95 CRM_Contact_Import_MetadataTrait::getHeaderPatterns()

will be removed around 5.75

107 CRM_Contact_Import_MetadataTrait::getFieldTitles()

since 5.69 will be removed around 5.75

Contact.php

Line Element Reason
232 CRM_Contact_Import_Parser_Contact::legacyCreateMultiple()

For single creates use the api instead (it's tested). For multiple a new variant of this function needs to be written and migrated to as this is a bit nasty

297 CRM_Contact_Import_Parser_Contact::formatCommonData()
1123 CRM_Contact_Import_Parser_Contact::formatLocationBlock()

AJAX.php

Line Element Reason
930 CRM_Contact_Page_AJAX::getContactRelationships()

since 5.68. Will be removed around 5.74.

Only-used-by-user-dashboard.

Relationship.php

Line Element Reason
237 CRM_Contact_Page_View_Relationship::links()

since 5.68. Will be removed around 5.74.

Only-used-by-user-dashboard.

Utils.php

Line Element Reason
225 CRM_Contribute_BAO_Contribution_Utils::getContributionStatuses()

This is called from a couple of places outside of core so it has been made unused and deprecated rather than having the now-obsolete parameter change. It should work much the same for the places that call it with a notice. It is not an api function & not supported for use outside core. Extensions should write their own functions.

Contribution.php

Line Element Reason
342 CRM_Contribute_BAO_Contribution::getValuesWithMappings()
465 CRM_Contribute_BAO_Contribution::getNumTermsByContributionAndMembershipType()
712 CRM_Contribute_BAO_Contribution::importableFields()
1482 CRM_Contribute_BAO_Contribution::getHonorContacts()
1612 CRM_Contribute_BAO_Contribution::getContributionDetails()

since 5.72 will be removed around 5.90

2136 CRM_Contribute_BAO_Contribution::loadRelatedObjects()

since 5.75 will be removed around 5.99. Note some universe usages exist but may be in unused extensions.

3287 CRM_Contribute_BAO_Contribution::buildOptions()
3803 CRM_Contribute_BAO_Contribution::loadRelatedMembershipObjects()

since well before 5.75 will be removed around 5.99. Note some universe usages exist but may be in unused extensions.

Note that in theory it should be possible to retrieve these from the line_item table with the membership_payment table being deprecated. Attempting to do this here causes tests to fail as it seems the api is not correctly linking the line items when the contribution is created in the flow where the contribution is created in the API, followed by the membership (using the api) followed by the membership payment. The membership payment BAO does have code to address this but it doesn't appear to be working.

I don't know if it never worked or broke as a result of https://issues.civicrm.org/jira/browse/CRM-14918.

3964 CRM_Contribute_BAO_Contribution::checkContributeSettings()

since 5.68 will be removed around 5.74.

4425 CRM_Contribute_BAO_Contribution::loadRelatedEntitiesByID()

since 5.75 will be removed around 5.99.

4458 CRM_Contribute_BAO_Contribution::getContributionTokenValues()
61 CRM_Contribute_BAO_Contribution::$_relatedObjects

ContributionPage.php

Line Element Reason
33 CRM_Contribute_BAO_ContributionPage::create()
56 CRM_Contribute_BAO_ContributionPage::setIsActive()
  • this bypasses hooks.
613 CRM_Contribute_BAO_ContributionPage::buildCustomDisplay()

assigning values to smarty like this is risky because

  • it is hard to debug since $name is used in the assign
  • it is potentially 'leaky' - it's better to do this on the form or close to where it is used / required. See CRM-17519 for leakage e.g.
922 CRM_Contribute_BAO_ContributionPage::getIsMembershipPayment()

ContributionRecur.php

Line Element Reason
36 CRM_Contribute_BAO_ContributionRecur::create()

since 5.76 will be removed around 5.90. Non-core users should all use the api.

57 CRM_Contribute_BAO_ContributionRecur::add()

since 5.76 will be removed around 5.96. Non-core users should all use the api. As of writing there are some core users.

219 CRM_Contribute_BAO_ContributionRecur::getCount()

use the api.

620 CRM_Contribute_BAO_ContributionRecur::copyCustomValues()
1023 CRM_Contribute_BAO_ContributionRecur::buildOptions()

ContributionSoft.php

Line Element Reason
188 CRM_Contribute_BAO_ContributionSoft::retrieve()

Premium.php

Line Element Reason
35 CRM_Contribute_BAO_Premium::retrieve()
45 CRM_Contribute_BAO_Premium::setIsActive()
  • this bypasses hooks.
57 CRM_Contribute_BAO_Premium::del()
84 CRM_Contribute_BAO_Premium::buildPremiumBlock()

since 5.69 will be removed around 5.75

Product.php

Line Element Reason
25 CRM_Contribute_BAO_Product::retrieve()
42 CRM_Contribute_BAO_Product::create()

AbstractEditPayment.php

Line Element Reason
45 CRM_Contribute_Form_AbstractEditPayment::$_bltID

AdditionalInfo.php

Line Element Reason
151 CRM_Contribute_Form_AdditionalInfo::buildPaymentReminders()

since 5.68 will be removed around 5.78.

AdditionalPayment.php

Line Element Reason
448 CRM_Contribute_Form_AdditionalPayment::testSubmit()

since 5.69 will be removed around 5.75

48 CRM_Contribute_Form_AdditionalPayment::$_contactId
  • use parent $this->contactID

Confirm.php

Line Element Reason
38 CRM_Contribute_Form_Contribution_Confirm::$_contributionID

use getContributionID()

Main.php

Line Element Reason
1384 CRM_Contribute_Form_Contribution_Main::testSubmit()
  • we are ditching this approach in favour of 'full form flow' = ie simulating postProcess.
32 CRM_Contribute_Form_Contribution_Main::$_defaultMemTypeId

unused

Contribution.php

Line Element Reason
1835 CRM_Contribute_Form_Contribution::testSubmit()

since 5.68 will be removed around 5.80.

Try something like use use \Civi\Test\FormTrait; $form = $this->getTestForm('CRM_Contribute_Form_Contribution', $submittedValues, [ 'id' => 4; 'action' => 'update', ]); $form->processForm();

ContributionBase.php

Line Element Reason
86 CRM_Contribute_Form_ContributionBase::$_separateMembershipPayment

use $this->isSeparateMembershipPayment() function.

179 CRM_Contribute_Form_ContributionBase::$_isBillingAddressRequiredForPayLater

ContributionRecur.php

Line Element Reason
45 CRM_Contribute_Form_ContributionRecur::$_crid

ActionSchedule.php

Line Element Reason
252 CRM_Core_BAO_ActionSchedule::add()
303 CRM_Core_BAO_ActionSchedule::retrieve()
317 CRM_Core_BAO_ActionSchedule::del()
328 CRM_Core_BAO_ActionSchedule::setIsActive()
  • this bypasses hooks.
529 CRM_Core_BAO_ActionSchedule::getRecipientListing()
834 CRM_Core_BAO_ActionSchedule::getAdditionalRecipients()

Address.php

Line Element Reason
34 CRM_Core_BAO_Address::create()
50 CRM_Core_BAO_Address::add()
1242 CRM_Core_BAO_Address::del()
1253 CRM_Core_BAO_Address::buildOptions()

Block.php

Line Element Reason
303 CRM_Core_BAO_Block::blockDelete()
  • just call the BAO / api directly.

Cache.php

Line Element Reason
269 CRM_Core_BAO_Cache::cleanKey()

ConfigSetting.php

Line Element Reason
48 CRM_Core_BAO_ConfigSetting::add()

This method was historically used to access civicrm_domain.config_backend. However, that has been fully replaced by the settings system since v4.7.

79 CRM_Core_BAO_ConfigSetting::retrieve()

This method was historically used to access civicrm_domain.config_backend. However, that has been fully replaced by the settings system since v4.7.

CustomField.php

Line Element Reason
158 CRM_Core_BAO_CustomField::create()
195 CRM_Core_BAO_CustomField::bulkSave()
273 CRM_Core_BAO_CustomField::retrieve()
283 CRM_Core_BAO_CustomField::setIsActive()
  • this bypasses hooks.
352 CRM_Core_BAO_CustomField::getFields()

since 5.71

573 CRM_Core_BAO_CustomField::getFieldObject()
2211 CRM_Core_BAO_CustomField::customOptionGroup()

Use the API OptionGroup.get

2400 CRM_Core_BAO_CustomField::getCustomFieldID()

Old function with weirdly ambiguous logic. Only used by APIv3. Use at your peril.

2440 CRM_Core_BAO_CustomField::getNameFromID()

Old function only used by APIv3.

2623 CRM_Core_BAO_CustomField::getEntity()

CustomGroup.php

Line Element Reason
361 CRM_Core_BAO_CustomGroup::retrieve()
387 CRM_Core_BAO_CustomGroup::setIsActive()
  • this bypasses hooks.
413 CRM_Core_BAO_CustomGroup::hasCustomGroup()

since 5.71 will be removed around 5.85.

428 CRM_Core_BAO_CustomGroup::autoCreateByActivityType()

Function moved

472 CRM_Core_BAO_CustomGroup::getTree()

Function demonstrates just how bad code can get from 20 years of entropy.

This function takes an overcomplicated set of params and returns an overcomplicated mix of custom groups, custom fields, custom values (if passed $entityID), and other random stuff.

593 CRM_Core_BAO_CustomGroup::buildLegacyGroupTree()

only used by legacy function.

620 CRM_Core_BAO_CustomGroup::formatLegacyDbValues()

only used by legacy functions.

874 CRM_Core_BAO_CustomGroup::getGroupDetail()

Legacy function

894 CRM_Core_BAO_CustomGroup::getCustomGroupDetail()

Legacy function

937 CRM_Core_BAO_CustomGroup::getActiveGroups()

since 5.71, will be removed around 5.85

978 CRM_Core_BAO_CustomGroup::getTableNameByEntityName()

since 5.71 will be removed around 5.85

999 CRM_Core_BAO_CustomGroup::getAllCustomGroupsByBaseEntity()

since 5.71 will be removed around 5.85

1009 CRM_Core_BAO_CustomGroup::_addWhereAdd()

since 5.71 will be removed around 5.85

1286 CRM_Core_BAO_CustomGroup::postProcess()

since 5.71 will be remvoed around 5.77

1516 CRM_Core_BAO_CustomGroup::checkCustomField()

Silly function that does almost nothing.

1772 CRM_Core_BAO_CustomGroup::getGroupTitles()

Silly function that shouldn't exist.

1830 CRM_Core_BAO_CustomGroup::getExtendedObjectTypes()
2038 CRM_Core_BAO_CustomGroup::getSubTypes()

as of 5.72 use getExtendsEntityColumnValueOptions - will be removed by 5.78

CustomOption.php

Line Element Reason
33 CRM_Core_BAO_CustomOption::retrieve()

Discount.php

Line Element Reason
29 CRM_Core_BAO_Discount::del()

Domain.php

Line Element Reason
48 CRM_Core_BAO_Domain::retrieve()
149 CRM_Core_BAO_Domain::edit()
161 CRM_Core_BAO_Domain::create()
170 CRM_Core_BAO_Domain::multipleDomains()
240 CRM_Core_BAO_Domain::addContactToDomainGroup()

Email.php

Line Element Reason
33 CRM_Core_BAO_Email::create()
106 CRM_Core_BAO_Email::add()
354 CRM_Core_BAO_Email::del()

EntityTag.php

Line Element Reason
54 CRM_Core_BAO_EntityTag::add()
98 CRM_Core_BAO_EntityTag::del()

WARNING: Nonstandard params searches by tag_id rather than id!

258 CRM_Core_BAO_EntityTag::create()
443 CRM_Core_BAO_EntityTag::buildOptions()

Extension.php

Line Element Reason
29 CRM_Core_BAO_Extension::retrieve()
44 CRM_Core_BAO_Extension::del()

File.php

Line Element Reason
37 CRM_Core_BAO_File::create()

FinancialTrxn.php

Line Element Reason
62 CRM_Core_BAO_FinancialTrxn::retrieve()
365 CRM_Core_BAO_FinancialTrxn::getPartialPaymentWithType()

This function basically calls CRM_Contribute_BAO_Contribution::getContributionBalance

  • just do that. If need be we could have a fn to get the contribution id but chances are the calling functions already know it anyway.
408 CRM_Core_BAO_FinancialTrxn::getTotalPayments()

use Apiv4.

IM.php

Line Element Reason
31 CRM_Core_BAO_IM::create()
53 CRM_Core_BAO_IM::add()
170 CRM_Core_BAO_IM::del()

Job.php

Line Element Reason
43 CRM_Core_BAO_Job::retrieve()
54 CRM_Core_BAO_Job::setIsActive()
  • this bypasses hooks.
68 CRM_Core_BAO_Job::del()

LocationType.php

Line Element Reason
35 CRM_Core_BAO_LocationType::retrieve()
45 CRM_Core_BAO_LocationType::setIsActive()
  • this bypasses hooks.
87 CRM_Core_BAO_LocationType::create()
98 CRM_Core_BAO_LocationType::del()

MailSettings.php

Line Element Reason
123 CRM_Core_BAO_MailSettings::retrieve()
137 CRM_Core_BAO_MailSettings::add()

since 5.72 will be removed around 5.82

Mapping.php

Line Element Reason
25 CRM_Core_BAO_Mapping::retrieve()
38 CRM_Core_BAO_Mapping::del()
49 CRM_Core_BAO_Mapping::add()
140 CRM_Core_BAO_Mapping::getMappingFields()

to be removed.

543 CRM_Core_BAO_Mapping::getCustomGroupName()

since 5.71 will be removed around 5.85.

MessageTemplate.php

Line Element Reason
34 CRM_Core_BAO_MessageTemplate::retrieve()
45 CRM_Core_BAO_MessageTemplate::setIsActive()
  • this bypasses hooks.
157 CRM_Core_BAO_MessageTemplate::del()

Navigation.php

Line Element Reason
64 CRM_Core_BAO_Navigation::setIsActive()
  • this bypasses hooks.
76 CRM_Core_BAO_Navigation::add()
116 CRM_Core_BAO_Navigation::retrieve()
592 CRM_Core_BAO_Navigation::processRename()
  • use API
603 CRM_Core_BAO_Navigation::processDelete()
  • use API

Note.php

Line Element Reason
55 CRM_Core_BAO_Note::getNotePrivacyHidden()

in favor of selectWhereClause

287 CRM_Core_BAO_Note::del()
384 CRM_Core_BAO_Note::getNoteTree()

only called by deprecated APIv3

430 CRM_Core_BAO_Note::buildNoteTree()

only called by deprecated APIv3

OpenID.php

Line Element Reason
31 CRM_Core_BAO_OpenID::create()
53 CRM_Core_BAO_OpenID::add()
132 CRM_Core_BAO_OpenID::del()

OptionGroup.php

Line Element Reason
25 CRM_Core_BAO_OptionGroup::retrieve()
35 CRM_Core_BAO_OptionGroup::setIsActive()
  • this bypasses hooks.
48 CRM_Core_BAO_OptionGroup::add()
73 CRM_Core_BAO_OptionGroup::del()

OptionValue.php

Line Element Reason
98 CRM_Core_BAO_OptionValue::retrieve()
108 CRM_Core_BAO_OptionValue::setIsActive()
  • this bypasses hooks.
226 CRM_Core_BAO_OptionValue::del()

Phone.php

Line Element Reason
31 CRM_Core_BAO_Phone::create()
53 CRM_Core_BAO_Phone::add()
238 CRM_Core_BAO_Phone::del()

PreferencesDate.php

Line Element Reason
25 CRM_Core_BAO_PreferencesDate::retrieve()
51 CRM_Core_BAO_PreferencesDate::del()

RecurringEntity.php

Line Element Reason
135 CRM_Core_BAO_RecurringEntity::add()

Setting.php

Line Element Reason
146 CRM_Core_BAO_Setting::setItem()
  • refer docs https://docs.civicrm.org/dev/en/latest/framework/setting/
435 CRM_Core_BAO_Setting::setValueOption()

Tag.php

Line Element Reason
30 CRM_Core_BAO_Tag::retrieve()
352 CRM_Core_BAO_Tag::del()

UFField.php

Line Element Reason
122 CRM_Core_BAO_UFField::retrieve()
133 CRM_Core_BAO_UFField::setIsActive()
  • this bypasses hooks.
155 CRM_Core_BAO_UFField::del()
267 CRM_Core_BAO_UFField::copy()

UFGroup.php

Line Element Reason
102 CRM_Core_BAO_UFGroup::setIsActive()
  • this bypasses hooks.
602 CRM_Core_BAO_UFGroup::getImportableFields()

use getProfileFieldMetadata

1351 CRM_Core_BAO_UFGroup::del()

UFJoin.php

Line Element Reason
31 CRM_Core_BAO_UFJoin::create()

UFMatch.php

Line Element Reason
497 CRM_Core_BAO_UFMatch::isEmptyTable()
510 CRM_Core_BAO_UFMatch::getContactIDs()
530 CRM_Core_BAO_UFMatch::getAllowedToLogin()
548 CRM_Core_BAO_UFMatch::getNextUfIdValue()
569 CRM_Core_BAO_UFMatch::isDuplicateUser()

Website.php

Line Element Reason
31 CRM_Core_BAO_Website::create()
43 CRM_Core_BAO_Website::add()
98 CRM_Core_BAO_Website::del()

WordReplacement.php

Line Element Reason
29 CRM_Core_BAO_WordReplacement::retrieve()
42 CRM_Core_BAO_WordReplacement::edit()
61 CRM_Core_BAO_WordReplacement::create()
82 CRM_Core_BAO_WordReplacement::del()

Schema.php

Line Element Reason
11 CRM_Core_CodeGen_Schema

Replaced by CRM_Core_CodeGen_PhpSchema. Delete this after civicrm-core and civix drop their references. Maybe allow grace-period of a couple months.

Component.php

Line Element Reason
96 CRM_Core_Component::getComponentIDs()
331 CRM_Core_Component::contactSubTypes()
346 CRM_Core_Component::contactSubTypeProperties()

Config.php

Line Element Reason
119 CRM_Core_Config::getLog()
134 CRM_Core_Config::getMailer()
196 CRM_Core_Config::reset()
459 CRM_Core_Config::addressSequence()
467 CRM_Core_Config::defaultContactCountry()
475 CRM_Core_Config::defaultContactCountryName()
487 CRM_Core_Config::defaultCurrencySymbol()

Controller.php

Line Element Reason
610 CRM_Core_Controller::assign_by_ref()

since 5.72 will be removed around 5.84

636 CRM_Core_Controller::get_template_vars()

since 5.69 will be removed around 5.93. use getTemplateVars.

696 CRM_Core_Controller::setWord()
718 CRM_Core_Controller::setExcel()

AllCoreTables.php

Line Element Reason
27 CRM_Core_DAO_AllCoreTables::init()

in 5.73 will be removed in 5.90

74 CRM_Core_DAO_AllCoreTables::get()

in 5.72 will be removed in 5.90.

179 CRM_Core_DAO_AllCoreTables::getCoreTables()

in 5.72 will be removed in 5.90

342 CRM_Core_DAO_AllCoreTables::getFullName()

in 5.72 will be removed in 5.96

363 CRM_Core_DAO_AllCoreTables::getBriefName()

in 5.72 will be removed in 5.102

408 CRM_Core_DAO_AllCoreTables::reinitializeCache()

in 5.54 will be removed in 5.85

DAO.php

Line Element Reason
1260 CRM_Core_DAO::getDatabaseName()

use mysql DATABASE() within the query.

1297 CRM_Core_DAO::schemaRequiresRebuilding()

in 5.72 will be removed in 5.85

1329 CRM_Core_DAO::checkFKConstraintInFormat()

in 5.72 will be removed in 5.85

1353 CRM_Core_DAO::checkFieldHasAlwaysValue()

in 5.72 will be removed in 5.85

1366 CRM_Core_DAO::checkFieldIsAlwaysNull()

in 5.72 will be removed in 5.85

1634 CRM_Core_DAO::getSortString()

in 5.72 will be removed in 5.85

1691 CRM_Core_DAO::deleteEntityContact()

in 5.47 will be removed in 5.80

2620 CRM_Core_DAO::triggerRebuild()
2631 CRM_Core_DAO::dropTriggers()
2642 CRM_Core_DAO::createTriggers()
2927 CRM_Core_DAO::buildOptions()

in favor of Civi::entity()->getOptions()

Overriding this function is no longer recommended as a way to customize options. Instead, option lists can be customized by either:

  1. Using a pseudoconstant callback
  2. Implementing hook_civicrm_fieldOptions
2951 CRM_Core_DAO::getOptionLabels()
3202 CRM_Core_DAO::setApiFilter()
3638 CRM_Core_DAO::isComponentEnabled()
89 CRM_Core_DAO::SERIALIZE_SEPARATOR_TRIMMED

format separated by VALUE_SEPARATOR

89 CRM_Core_DAO::SERIALIZE_PHP

format using php serialize()

66 CRM_Core_DAO::$_nullObject
86 CRM_Core_DAO::$_nullArray

Error.php

Line Element Reason
313 CRM_Core_Error::fatal()

This is a really annoying function. We ❤ exceptions. Be exceptional!

488 CRM_Core_Error::debug()

prefer Civi::log().

600 CRM_Core_Error::debug_log_message()

see https://docs.civicrm.org/dev/en/latest/framework/logging/

Use (e.g) Civi::log()->error() (priority dependent).

1005 CRM_Core_Error::createAPIError()

This function is no longer used by v3 api.

Exception.php

Line Element Reason
103 CRM_Core_Exception::getExtraParams()

Remove in v6.0. Compatibility with older API_Exception/CiviCRM_API3_Exception contracts.

Date.php

Line Element Reason
19 CRM_Core_Form_Date

since 5.69 will be removed around 5.79

36 CRM_Core_Form_Date::buildAllowedDateFormats()

since 5.69 will be removed around 5.79

81 CRM_Core_Form_Date::returnDateRangeSelector()

since 5.28 will be removed around 5.79

It can be - relative or absolute.

128 CRM_Core_Form_Date::addDateRangeToForm()

since 5.28 will be removed around 5.79

26 CRM_Core_Form_Date::DATE_yyyy_mm_dd

since 5.69 will be removed around 5.79

26 CRM_Core_Form_Date::DATE_mm_dd_yy

since 5.69 will be removed around 5.79

26 CRM_Core_Form_Date::DATE_mm_dd_yyyy

since 5.69 will be removed around 5.79

26 CRM_Core_Form_Date::DATE_Month_dd_yyyy

since 5.69 will be removed around 5.79

26 CRM_Core_Form_Date::DATE_dd_mon_yy

since 5.69 will be removed around 5.79

26 CRM_Core_Form_Date::DATE_dd_mm_yyyy

since 5.69 will be removed around 5.79

PDFLetterCommon.php

Line Element Reason
29 CRM_Core_Form_Task_PDFLetterCommon
36 CRM_Core_Form_Task_PDFLetterCommon::preProcess()
50 CRM_Core_Form_Task_PDFLetterCommon::buildQuickForm()
186 CRM_Core_Form_Task_PDFLetterCommon::setDefaultValues()
265 CRM_Core_Form_Task_PDFLetterCommon::processTemplate()
329 CRM_Core_Form_Task_PDFLetterCommon::formatMessage()
381 CRM_Core_Form_Task_PDFLetterCommon::renderFromRows()
399 CRM_Core_Form_Task_PDFLetterCommon::listTokens()
415 CRM_Core_Form_Task_PDFLetterCommon::outputFromHtml()

Form.php

Line Element Reason
1429 CRM_Core_Form::assign_by_ref()

since 5.72 will be removed around 5.84

1455 CRM_Core_Form::get_template_vars()

since 5.69 will be removed around 5.93. use getTemplateVars.

1646 CRM_Core_Form::addDateRange()

Use $this->addDatePickerRange() instead.

2164 CRM_Core_Form::getVar()
  • use of this function assumes that an otherwise unavailable variable can be used form outside the class in question. However, the very fact it is otherwise unavailable means there is no contract that it will not be changed or become unused. This function is OK for temporary usage but should be accompanied with an effort to establish a more correct method or property tested hook / api interface if this is being done from outside of core.
2193 CRM_Core_Form::setVar()
  • use of this function assumes that an otherwise unavailable variable can be used form outside the class in question. However, the very fact it is otherwise unavailable means there is no contract that it will not be changed or become unused. This function is OK for temporary usage but should be accompanied with an effort to establish a more correct method or property tested hook / api interface if this is being done from outside of core.
2212 CRM_Core_Form::addDate()

Use $this->add('datepicker', ...) instead.

2302 CRM_Core_Form::addDateTime()

Use $this->add('datepicker', ...) instead.

2665 CRM_Core_Form::getLoggedInUserContactID()
3112 CRM_Core_Form::getContactIDIfAccessingOwnRecord()

use getAuthenticatedContactID()

I18n.php

Line Element Reason
35 CRM_Core_I18n::$SQL_ESCAPER

This variable has 1-2 references in contrib, which -probably- aren't functionally necessary. (Extensions don't load in pre-installation environments...) But we'll keep the property stub just to prevent crashes.

Replaced by $GLOBALS['CIVICRM_SQL_ESCAPER'].

JobManager.php

Line Element Reason
31 CRM_Core_JobManager::$jobs

Lock.php

Line Element Reason
96 CRM_Core_Lock::createCivimailLock()

OptionGroup.php

Line Element Reason
441 CRM_Core_OptionGroup::getAssoc()
488 CRM_Core_OptionGroup::deleteAssoc()

EntityPageTrait.php

Line Element Reason
63 CRM_Core_Page_EntityPageTrait::$_contactId

Historically pages alternate between $_contactID and $_contactId. We'll standardise on one

Page.php

Line Element Reason
329 CRM_Core_Page::assign_by_ref()

since 5.72 will be removed around 5.84

355 CRM_Core_Page::get_template_vars()

since 5.69 will be removed around 5.93. use getTemplateVars.

BaseIPN.php

Line Element Reason
77 CRM_Core_Payment_BaseIPN::failed()

use the api.

123 CRM_Core_Payment_BaseIPN::pending()
146 CRM_Core_Payment_BaseIPN::cancelled()

The intended replacement code is

Contribution::update(FALSE)->setValues([ 'cancel_date' => 'now', 'contribution_status_id:name' => 'Cancelled', ])->addWhere('id', '=', $contribution->id)->execute();

208 CRM_Core_Payment_BaseIPN::unhandled()
226 CRM_Core_Payment_BaseIPN::cancelParticipant()
243 CRM_Core_Payment_BaseIPN::cancelMembership()
323 CRM_Core_Payment_BaseIPN::completeTransaction()

Jumbled up function.

The purpose of this function is to transition a pending transaction to Completed including updating any related entities.

It has been overloaded to also add recurring transactions to the database, cloning the original transaction and updating related entities.

It is recommended to avoid calling this function directly and call the api functions:

  • contribution.completetransaction
  • contribution.repeattransaction

These functions are the focus of testing efforts and more accurately reflect the division of roles (the job of the IPN class is to determine the outcome, transaction id, invoice id & to validate the source and from there it should be possible to pass off transaction management.)

This function has been problematic for some time but there are now several tests via the api_v3_Contribution test and the Paypal & Authorize.net IPN tests so any refactoring should be done in conjunction with those.

This function needs to have the 'body' moved to the CRM_Contribute_BAO_Contribute class and to undergo refactoring to separate the complete transaction and repeat transaction functionality into separate functions with a shared function that updates related components.

Note that it is not necessary payment processor extension to implement an IPN class now. In general the code on the IPN class is better accessed through the api which de-jumbles it a bit.

e.g the payment class can have a function like (based on Omnipay extension):

public function handlePaymentNotification() { $response = $this->getValidatedOutcome(); if ($response->isSuccessful()) { try { // @todo check if it is a repeat transaction & call repeattransaction instead. civicrm_api3('contribution', 'completetransaction', array('id' => $this->transaction_id)); } catch (CRM_Core_Exception $e) { if (!stristr($e->getMessage(), 'Contribution already completed')) { $this->handleError('error', $this->transaction_id . $e->getMessage(), 'ipn_completion', 9000, 'An error may have occurred. Please check your receipt is correct'); $this->redirectOrExit('success'); } elseif ($this->transaction_id) { civicrm_api3('contribution', 'create', array('id' => $this->transaction_id, 'contribution_status_id' => 'Failed')); }

336 CRM_Core_Payment_BaseIPN::getBillingID()

Get site billing ID.

363 CRM_Core_Payment_BaseIPN::sendMail()
35 CRM_Core_Payment_BaseIPN::$_isRecurring
44 CRM_Core_Payment_BaseIPN::$_isFirstOrLastRecurringPayment

PayPalImpl.php

Line Element Reason
556 CRM_Core_Payment_PayPalImpl::doDirectPayment()
937 CRM_Core_Payment_PayPalImpl::doTransferCheckout()

Payment.php

Line Element Reason
189 CRM_Core_Payment::setPaymentInstrumentID()

Set payment Instrument id - see note on getPaymentInstrumentID.

By default we actually ignore the form value. The manual processor takes it more seriously.

544 CRM_Core_Payment::setForm()
554 CRM_Core_Payment::getForm()
1366 CRM_Core_Payment::doDirectPayment()

Does a server to server payment transaction.

1382 CRM_Core_Payment::doTransferCheckout()
1733 CRM_Core_Payment::isSupported()
  • use $paymentProcessor->supports(array('cancelRecurring');
104 CRM_Core_Payment::$_processorName

PseudoConstant.php

Line Element Reason
133 CRM_Core_PseudoConstant::get()

in favor of Civi::entity()->getOptions()

369 CRM_Core_PseudoConstant::populate()

generic populate method. All pseudoconstant functions that use this method are also @deprecated

The static array $var is populated from the db using the $name DAO.

Note: any database errors will be trapped by the DAO.

45 CRM_Core_PseudoConstant::$activityType

Please use the buildOptions() method in the appropriate BAO object.

629 CRM_Core_PseudoConstant::stateProvinceAbbreviationForCountry()
643 CRM_Core_PseudoConstant::stateProvinceAbbreviationForDefaultCountry()
746 CRM_Core_PseudoConstant::allGroup()

Please use the buildOptions() method in the appropriate BAO object.

Get all groups from database

The static array group is returned, and if it's called the first time, the Group DAO is used to get all the groups.

Note: any database errors will be trapped by the DAO.

76 CRM_Core_PseudoConstant::$group

Please use the buildOptions() method in the appropriate BAO object.

962 CRM_Core_PseudoConstant::paymentProcessor()

Please use the buildOptions() method in the appropriate BAO object. Get all active payment processors

The static array paymentProcessor is returned

993 CRM_Core_PseudoConstant::paymentProcessorType()

Please use the buildOptions() method in the appropriate BAO object.

The static array paymentProcessorType is returned

1031 CRM_Core_PseudoConstant::activityStatus()

Please use the buildOptions() method in the appropriate BAO object.

Get all Activity Statuses.

1048 CRM_Core_PseudoConstant::visibility()

Please use the buildOptions() method in the appropriate BAO object.

Get all Visibility levels.

The static array visibility is returned

SelectValues.php

Line Element Reason
561 CRM_Core_SelectValues::domainTokens()
587 CRM_Core_SelectValues::membershipTokens()
607 CRM_Core_SelectValues::eventTokens()
626 CRM_Core_SelectValues::contributionTokens()
645 CRM_Core_SelectValues::contactTokens()
663 CRM_Core_SelectValues::participantTokens()

function.sectionTotal.php

Line Element Reason
38 smarty_function_sectionTotal()

This is called from table.tpl but we aim to remove from there.

SmartyCompatibility.php

Line Element Reason
75 CRM_Core_SmartyCompatibility::load_filter()
92 CRM_Core_SmartyCompatibility::register_modifier()
109 CRM_Core_SmartyCompatibility::register_resource()
134 CRM_Core_SmartyCompatibility::register_function()
152 CRM_Core_SmartyCompatibility::get_template_vars()

since 5.69 will be removed around 5.79

167 CRM_Core_SmartyCompatibility::assign_by_ref()
183 CRM_Core_SmartyCompatibility::clear_assign()

CustomData.php

Line Element Reason
23 CRM_Custom_Form_CustomData

since 5.72 will be removed around 5.92

54 CRM_Custom_Form_CustomData::addToForm()
  • preferred code now is to add to ensure the tpl loads custom data using the ajax template & add code to buildForm() like this
if ($this->isSubmitted()) {
  $this->addCustomDataFieldsToForm('Membership', array_filter([
  'id' => $this->getMembershipID(),
  'membership_type_id' => $this->getSubmittedValue('membership_type_id')
]));
}

$this->getDefaultEntity() must be defined for the form class for this to work.

If the postProcess form cannot use the api & instead uses a BAO function it will need. $params['custom'] = CRM_Core_BAO_CustomField::postProcess($submitted, $this->_id, $this->getDefaultEntity());

100 CRM_Custom_Form_CustomData::preProcess()

see https://github.com/civicrm/civicrm-core/pull/29241 for preferred approach - basically

  1. at the tpl layer use CRM/common/customDataBlock.tpl
  2. to make the fields available for postProcess if ($this->isSubmitted()) { $this->addCustomDataFieldsToForm('FinancialAccount'); }
  3. pass getSubmittedValues() to CRM_Core_BAO_CustomField::postProcess($this->getSubmittedValues(), $this->_id, 'FinancialAccount'); to ensure any money or number fields are handled for localisation
239 CRM_Custom_Form_CustomData::setGroupTree()

since 5.65 will be removed around 5.80.

Group.php

Line Element Reason
348 CRM_Custom_Form_Group::getRelationshipTypes()

AJAX.php

Line Element Reason
27 CRM_Custom_Page_AJAX::getOptionList()

DedupeRuleGroup.php

Line Element Reason
59 CRM_Dedupe_BAO_DedupeRuleGroup::$noRules

this was introduced in https://github.com/civicrm/civicrm-svn/commit/15136b07013b3477d601ebe5f7aa4f99f801beda as an awkward way to avoid fatalling on an invalid rule set with no rules.

Passing around a property is a bad way to do that check & we will work to remove.

Exception.php

Line Element Reason
21 CRM_Dedupe_BAO_Exception

Rule.php

Line Element Reason
15 CRM_Dedupe_BAO_Rule
23 CRM_Dedupe_BAO_Rule::validateContacts()
33 CRM_Dedupe_BAO_Rule::dedupeRuleFields()

RuleGroup.php

Line Element Reason
15 CRM_Dedupe_BAO_RuleGroup
22 CRM_Dedupe_BAO_RuleGroup::getByType()

Finder.php

Line Element Reason
332 CRM_Dedupe_Finder::getTree()

Function demonstrates just how bad code can get from 20 years of entropy.

This function takes an overcomplicated set of params and returns an overcomplicated mix of custom groups, custom fields, custom values (if passed $entityID), and other random stuff.

Event.php

Line Element Reason
28 CRM_Event_BAO_Event::retrieve()
38 CRM_Event_BAO_Event::setIsActive()
  • this bypasses hooks.
167 CRM_Event_BAO_Event::del()

Participant.php

Line Element Reason
540 CRM_Event_BAO_Participant::importableFields()

since 5.74 will be removed around 5.86

ParticipantStatusType.php

Line Element Reason
25 CRM_Event_BAO_ParticipantStatusType::add()
35 CRM_Event_BAO_ParticipantStatusType::create()
69 CRM_Event_BAO_ParticipantStatusType::retrieve()
79 CRM_Event_BAO_ParticipantStatusType::setIsActive()
  • this bypasses hooks.

EventFees.php

Line Element Reason
33 CRM_Event_Form_EventFees::preProcess()

since 5.69 will be removed around 5.74

EventInfo.php

Line Element Reason
32 CRM_Event_Form_ManageEvent_EventInfo::$_eventType
  • never set.

TabHeader.php

Line Element Reason
23 CRM_Event_Form_ManageEvent_TabHeader

since 5.72 will be removed around 5.78.

33 CRM_Event_Form_ManageEvent_TabHeader::build()

since 5.72 will be removed around 5.78.

60 CRM_Event_Form_ManageEvent_TabHeader::process()

since 5.72 will be removed around 5.78.

207 CRM_Event_Form_ManageEvent_TabHeader::reset()

since 5.72 will be removed around 5.78.

220 CRM_Event_Form_ManageEvent_TabHeader::getCurrentTab()

since 5.72 will be removed around 5.78.

Participant.php

Line Element Reason
40 CRM_Event_Form_Participant::$_pId

unused

58 CRM_Event_Form_Participant::$_values

use $this->getPriceFieldMetadata()

101 CRM_Event_Form_Participant::$_contactId

ParticipantFeeSelection.php

Line Element Reason
34 CRM_Event_Form_ParticipantFeeSelection::$_contactId
57 CRM_Event_Form_ParticipantFeeSelection::$_participantId

use getParticipantID().

Register.php

Line Element Reason
56 CRM_Event_Form_Registration_Register::$_noFees

Registration.php

Line Element Reason
33 CRM_Event_Form_Registration::$_eventId

access via getEventID

214 CRM_Event_Form_Registration::$_isBillingAddressRequiredForPayLater

Batch.php

Line Element Reason
311 CRM_Event_Form_Task_Batch::updateContributionStatus()

This is only called from one place in the code & it is unclear whether it is a function on the way in or on the way out

PseudoConstant.php

Line Element Reason
21 CRM_Event_PseudoConstant

functions. Use the API instead.

129 CRM_Event_PseudoConstant::participantListing()
166 CRM_Event_PseudoConstant::eventTemplates()

Use the API instead

203 CRM_Event_PseudoConstant::pcPage()

Info.php

Line Element Reason
89 CRM_Extension_Info::$maintainer

EntityFinancialAccount.php

Line Element Reason
31 CRM_Financial_BAO_EntityFinancialAccount::retrieve()
55 CRM_Financial_BAO_EntityFinancialAccount::add()
83 CRM_Financial_BAO_EntityFinancialAccount::del()

FinancialAccount.php

Line Element Reason
32 CRM_Financial_BAO_FinancialAccount::retrieve()
42 CRM_Financial_BAO_FinancialAccount::setIsActive()
  • this bypasses hooks.
55 CRM_Financial_BAO_FinancialAccount::add()
68 CRM_Financial_BAO_FinancialAccount::del()

FinancialItem.php

Line Element Reason
28 CRM_Financial_BAO_FinancialItem::retrieve()
186 CRM_Financial_BAO_FinancialItem::retrieveEntityFinancialTrxn()
  • only called by tests - to be replaced with $trxn = (array) EntityFinancialTrxn::get() ->addWhere('id', '=', $contributionID) ->addWhere('entity_table', '=', 'civicrm_contribution') ->addSelect('*')->execute();
186 CRM_Financial_BAO_FinancialItem::retrieveEntityFinancialTrxn()

FinancialType.php

Line Element Reason
28 CRM_Financial_BAO_FinancialType::retrieve()
39 CRM_Financial_BAO_FinancialType::setIsActive()
  • this bypasses hooks.
52 CRM_Financial_BAO_FinancialType::create()
70 CRM_Financial_BAO_FinancialType::add()
82 CRM_Financial_BAO_FinancialType::del()
335 CRM_Financial_BAO_FinancialType::buildPermissionedClause()
362 CRM_Financial_BAO_FinancialType::checkPermissionedLineItems()

since 5.68 not part of core - to be removed 5.74

416 CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()

since 5.75 will be removed around 5.90 Generally you should call hooks & allow the extension to engage but if you need to then check the extension status directly - do not use a helper.

Payment.php

Line Element Reason
374 CRM_Financial_BAO_Payment::getConfirmationTemplateParameters()

these template variables no longer used in the core template from 5.69 - stop assigning them.

PaymentProcessor.php

Line Element Reason
35 CRM_Financial_BAO_PaymentProcessor::create()
71 CRM_Financial_BAO_PaymentProcessor::retrieve()
81 CRM_Financial_BAO_PaymentProcessor::setIsActive()
  • this bypasses hooks.
108 CRM_Financial_BAO_PaymentProcessor::del()

PaymentProcessorType.php

Line Element Reason
31 CRM_Financial_BAO_PaymentProcessorType::retrieve()
41 CRM_Financial_BAO_PaymentProcessorType::setIsActive()
  • this bypasses hooks.
136 CRM_Financial_BAO_PaymentProcessorType::del()

SalesTaxTrait.php

Line Element Reason
24 CRM_Financial_Form_SalesTaxTrait::assignSalesTaxTermToTemplate()

since 5.69 will be removed around 5.80

AJAX.php

Line Element Reason
239 CRM_Financial_Page_AJAX::getFinancialTransactionsList()

MapField.php

Line Element Reason
159 CRM_Import_Form_MapField::buildSavedMappingFields()
  • working to remove this in favour of addSavedMappingFields

ImportProcessor.php

Line Element Reason
216 CRM_Import_ImportProcessor::setContactTypeByConstant()

Utils.php

Line Element Reason
55 CRM_Invoicing_Utils::isInvoicingEnabled()

since 5.68 expected removal time to be added when we add noisy deprecation.

66 CRM_Invoicing_Utils::getTaxTerm()

since 5.68 expected removal time to be added when we add noisy deprecation.

Component.php

Line Element Reason
8 CRM_Mailing_BAO_Component

copy of renamed class.

Mailing.php

Line Element Reason
936 CRM_Mailing_BAO_Mailing::getGroupNames()

since 5.71 will be removed around 5.77

1171 CRM_Mailing_BAO_Mailing::checkSendable()
1896 CRM_Mailing_BAO_Mailing::del()
1934 CRM_Mailing_BAO_Mailing::getReturnProperties()

This is used by CiviMail but will be made redundant by FlexMailer/TokenProcessor.

MailingAB.php

Line Element Reason
54 CRM_Mailing_BAO_MailingAB::del()

MailingComponent.php

Line Element Reason
25 CRM_Mailing_BAO_MailingComponent::retrieve()
36 CRM_Mailing_BAO_MailingComponent::setIsActive()
  • this bypasses hooks.

MailingJob.php

Line Element Reason
48 CRM_Mailing_BAO_MailingJob::create()

since 5.71 will be removed around 5.85

770 CRM_Mailing_BAO_MailingJob::del()

MailingEventBounce.php

Line Element Reason
82 CRM_Mailing_Event_BAO_MailingEventBounce::create()

MailingEventDelivered.php

Line Element Reason
65 CRM_Mailing_Event_BAO_MailingEventDelivered::create()

MailingEventQueue.php

Line Element Reason
303 CRM_Mailing_Event_BAO_MailingEventQueue::bulkCreate()

Membership.php

Line Element Reason
915 CRM_Member_BAO_Membership::importableFields()
1125 CRM_Member_BAO_Membership::updateRecurMembership()

This is not used anywhere and should be removed soon! Function for updating a membership record's contribution_recur_id.

MembershipBlock.php

Line Element Reason
30 CRM_Member_BAO_MembershipBlock::create()
42 CRM_Member_BAO_MembershipBlock::del()

MembershipLog.php

Line Element Reason
44 CRM_Member_BAO_MembershipLog::del()

MembershipPayment.php

Line Element Reason
83 CRM_Member_BAO_MembershipPayment::del()

MembershipStatus.php

Line Element Reason
25 CRM_Member_BAO_MembershipStatus::retrieve()
36 CRM_Member_BAO_MembershipStatus::setIsActive()
  • this bypasses hooks.
144 CRM_Member_BAO_MembershipStatus::del()

MembershipType.php

Line Element Reason
36 CRM_Member_BAO_MembershipType::retrieve()
46 CRM_Member_BAO_MembershipType::setIsActive()
  • this bypasses hooks.
108 CRM_Member_BAO_MembershipType::del()
236 CRM_Member_BAO_MembershipType::getMembershipTypes()

use getAllMembershipTypes.

260 CRM_Member_BAO_MembershipType::getMembershipTypeDetails()

use getMembershipType.

Membership.php

Line Element Reason
582 CRM_Member_Form_Membership::buildMembershipPriceSet()

this should be updated to align with the other forms that use getOrder()

941 CRM_Member_Form_Membership::emailReceipt()

This function was shared with Batch_Entry which had limited overlap & needs rationalising.

Form.php

Line Element Reason
79 CRM_Member_Form::$_priceSetId

use getPriceSetID()

Tab.php

Line Element Reason
36 CRM_Member_Page_Tab::$_contactId

PCP.php

Line Element Reason
30 CRM_PCP_BAO_PCP::create()
360 CRM_PCP_BAO_PCP::deleteById()

PCPBlock.php

Line Element Reason
23 CRM_PCP_BAO_PCPBlock::create()

Pledge.php

Line Element Reason
32 CRM_Pledge_BAO_Pledge::retrieve()

PledgeBlock.php

Line Element Reason
25 CRM_Pledge_BAO_PledgeBlock::retrieve()
37 CRM_Pledge_BAO_PledgeBlock::create()
60 CRM_Pledge_BAO_PledgeBlock::add()
124 CRM_Pledge_BAO_PledgeBlock::buildPledgeBlock()

since 5.68 will be removed around 5.74

PledgePayment.php

Line Element Reason
175 CRM_Pledge_BAO_PledgePayment::add()
  • use the api which will use create (soon).
185 CRM_Pledge_BAO_PledgePayment::retrieve()
196 CRM_Pledge_BAO_PledgePayment::del()

LineItem.php

Line Element Reason
112 CRM_Price_BAO_LineItem::retrieve()

PriceField.php

Line Element Reason
180 CRM_Price_BAO_PriceField::retrieve()
190 CRM_Price_BAO_PriceField::setIsActive()
  • this bypasses hooks.
549 CRM_Price_BAO_PriceField::getOptions()

since 5.75 will be removed around 5.95 - it is unclear why this function does not set tax for default contribution tax rate & hence it should be avoided.

PriceFieldValue.php

Line Element Reason
113 CRM_Price_BAO_PriceFieldValue::retrieve()
183 CRM_Price_BAO_PriceFieldValue::setIsActive()
  • this bypasses hooks.
213 CRM_Price_BAO_PriceFieldValue::del()

PriceSet.php

Line Element Reason
45 CRM_Price_BAO_PriceSet::create()

Use writeRecord

68 CRM_Price_BAO_PriceSet::retrieve()
78 CRM_Price_BAO_PriceSet::setIsActive()
  • this bypasses hooks.
572 CRM_Price_BAO_PriceSet::processAmount()

since 5.69 will be removed around 5.85. This function is still in use but marking deprecated to make it clear that we are moving away from it. There is no function that has the guaranteed stable signature that would allow us to support if from outside of core so if using this or the core alternative from an extension you need to rely on unit tests to keep your code stable. Within core we already have good test cover on code that calls this.

The recommended approach within core is something like

private function initializeOrder(): void { $this->order = new CRM_Financial_BAO_Order(); $this->order->setForm($this); $this->order->setPriceSelectionFromUnfilteredInput($this->>getSubmittedValues()); }

$lineItems = $this->order->getLineItems();

713 CRM_Price_BAO_PriceSet::buildPriceSet()

since 5.68. Will be removed around 5.80.

Queue.php

Line Element Reason
165 CRM_Queue_Queue::numberOfItems()

Use getStatistic(string $name) instead. The definition of numberOfItems() has become conflicted among different subclasses.

ReportInstance.php

Line Element Reason
172 CRM_Report_BAO_ReportInstance::del()
202 CRM_Report_BAO_ReportInstance::retrieve()

Form.php

Line Element Reason
2345 CRM_Report_Form::getFromTo()
3773 CRM_Report_Form::legacySlowGroupFilterClause()
3963 CRM_Report_Form::buildACLClause()

in favor of buildPermissionClause

Note that if the buildPermissionClause function is called (which most reports do from buildQuery then the results of this function are re-calculated and overwritten.

4446 CRM_Report_Form::addAddressFields()
  • use getAddressColumns which is a more accurate description and also accepts an array of options rather than a long list

adding address fields to construct function in reports

4875 CRM_Report_Form::getBasicContactFields()
  • use getColumns('Contact') instead

SmsProvider.php

Line Element Reason
110 CRM_SMS_BAO_SmsProvider::setIsActive()
  • this bypasses hooks.
123 CRM_SMS_BAO_SmsProvider::del()

Provider.php

Line Element Reason
310 CRM_SMS_Provider::formatPhone()

since 5.73 will be removed around 5.95

Field.php

Line Element Reason
275 CRM_UF_Page_Field::preview()

Links should point directly to civicrm/admin/uf/group/preview

Group.php

Line Element Reason
371 CRM_UF_Page_Group::preview()

Links should point directly to civicrm/admin/uf/group/preview

Array.php

Line Element Reason
67 CRM_Utils_Array::value()

In most cases this can be replaced with $list[$key] ?? $default with the minor difference that when $list[$key] exists and is NULL, this function will always return NULL.

1263 CRM_Utils_Array::toKeyValueRows()
1276 CRM_Utils_Array::formatArrayKeys()

use convertCheckboxInputToArray instead (after testing) https://github.com/civicrm/civicrm-core/pull/8169

CacheWrapper.php

Line Element Reason
70 CRM_Utils_Cache_CacheWrapper::flush()

Interface.php

Line Element Reason
63 CRM_Utils_Cache_Interface::flush()

Date.php

Line Element Reason
602 CRM_Utils_Date::convertToDefaultDate()

since 5.70 will be removed around 5.80.

At time of deprecation only usages were in CiviHR & CiviProspect in classes that appeared to be otherwise unmaintained & broken.

File.php

Line Element Reason
627 CRM_Utils_File::baseFilePath()

Hook.php

Line Element Reason
1000 CRM_Utils_Hook::tokenValues()

since 5.71 will be removed sometime after all core uses are fully removed.

1508 CRM_Utils_Hook::optionValues()

in favor of hook_civicrm_fieldOptions

1578 CRM_Utils_Hook::notePrivacy()

since 5.67 will be removed around 5.85 .

1627 CRM_Utils_Hook::dupeQuery()

since 5.72

1708 CRM_Utils_Hook::import()
45 CRM_Utils_Hook::$_nullObject

JSON.php

Line Element Reason
62 CRM_Utils_JSON::encodeDataTableSelector()

Pager.php

Line Element Reason
41 CRM_Utils_Pager::ROWCOUNT

Recent.php

Line Element Reason
336 CRM_Utils_Recent::delContact()

Request.php

Line Element Reason
157 CRM_Utils_Request::exportValues()

We should use a function that checks url values.

This is a replacement for $_REQUEST which includes $_GET/$_POST but excludes $_COOKIE / $_ENV / $_SERVER.

REST.php

Line Element Reason
344 CRM_Utils_REST::fatal()

Rule.php

Line Element Reason
862 CRM_Utils_Rule::validContact()

SoapServer.php

Line Element Reason
22 CRM_Utils_SoapServer

TempTable.php

Line Element Reason
256 CRM_Utils_SQL_TempTable::isUtf8()
335 CRM_Utils_SQL_TempTable::setUtf8()

This method is deprecated as tables should be assumed to have UTF-8 as the default character set and collation; some other character set or collation may be specified in the column definition.

59 CRM_Utils_SQL_TempTable::UTF8

The system will attempt to use the same as your other tables, and if you really need something else then use createWithColumns and specify it per-column there.

SQL.php

Line Element Reason
130 CRM_Utils_SQL::supportsFullGroupBy()

String.php

Line Element Reason
891 CRM_Utils_String::startsWith()
905 CRM_Utils_String::endsWith()

Base.php

Line Element Reason
316 CRM_Utils_System_Base::logout()

This function should be removed in favor of linking to the CMS's logout page

18 CRM_Utils_System_Base::$is_drupal

TRUE, if the CMS is Drupal.

28 CRM_Utils_System_Base::$is_joomla

TRUE, if the CMS is Joomla!.

38 CRM_Utils_System_Base::$is_wordpress

TRUE, if the CMS is WordPress.

DrupalBase.php

Line Element Reason
627 CRM_Utils_System_DrupalBase::parseDrupalSiteNameFromRoot()

System.php

Line Element Reason
422 CRM_Utils_System::getUrlPath()
1112 CRM_Utils_System::urlEncode()
1621 CRM_Utils_System::relativeURL()
1882 CRM_Utils_System::isInUpgradeMode()

Time.php

Line Element Reason
97 CRM_Utils_Time::getTime()

Prefer CRM_Utils_Time::date(), whose name looks similar to the stdlib work-a-like.

109 CRM_Utils_Time::getTimeRaw()

Prefer CRM_Utils_Time::time(), whose name looks similar to the stdlib work-a-like.

Token.php

Line Element Reason
83 CRM_Utils_Token::getRequiredTokens()

This is used by CiviMail but will be made redundant by FlexMailer.

111 CRM_Utils_Token::requiredTokens()

since 5.78 will be removed around 5.90

234 CRM_Utils_Token::replaceDomainTokens()

since ages ago will be removed around 5.90

271 CRM_Utils_Token::getDomainTokenReplacement()
298 CRM_Utils_Token::replaceMailingTokens()
474 CRM_Utils_Token::getActionTokenReplacement()
533 CRM_Utils_Token::replaceContactTokens()
586 CRM_Utils_Token::getContactTokenReplacement()
683 CRM_Utils_Token::replaceHookTokens()
713 CRM_Utils_Token::getTokenCategories()

since 5.78 will be removed around 5.90.

736 CRM_Utils_Token::getHookTokenReplacement()
766 CRM_Utils_Token::unescapeTokens()
856 CRM_Utils_Token::replaceSubscribeTokens()
924 CRM_Utils_Token::replaceWelcomeTokens()

since 5.65 will be removed around 5.71

1034 CRM_Utils_Token::getTokenDetails()
1157 CRM_Utils_Token::getAnonymousTokenDetails()
1184 CRM_Utils_Token::getMembershipTokenDetails()
1319 CRM_Utils_Token::_buildContributionTokens()

Do not use this function - it still needs full removal from active code in CRM_Contribute_Form_Task_PDFLetter.

1373 CRM_Utils_Token::replaceEntityTokens()

Replace tokens for an entity.

1408 CRM_Utils_Token::getApiTokenReplacement()
1454 CRM_Utils_Token::getMembershipTokenReplacement()
1528 CRM_Utils_Token::getContributionTokenReplacement()
1578 CRM_Utils_Token::legacyContactTokens()

Only used from deprecated functions not called by core.

1597 CRM_Utils_Token::getCustomFieldTokens()
1655 CRM_Utils_Token::convertPseudoConstantsUsingMetadata()

Submit.php

Line Element Reason
25 Submit::EVENT_NAME
  • You may simply use the event name directly. dev/core#1744

AfformScanner.php

Line Element Reason
230 CRM_Afform_AfformScanner::getLayout()

unused function

AbstractFlowsTest.php

Line Element Reason
196 AbstractFlowsTest::credApikey()

Grant.php

Line Element Reason
77 CRM_Grant_BAO_Grant::retrieve()
84 CRM_Grant_BAO_Grant::add()
92 CRM_Grant_BAO_Grant::create()
149 CRM_Grant_BAO_Grant::deleteContact()
160 CRM_Grant_BAO_Grant::del()

Cart.php

Line Element Reason
355 CRM_Event_Cart_Form_Cart::retrieveContact()

copy of previously shared code.

28 CRM_Event_Cart_Form_Cart::$discounts

Not recommended for new extensions.

BaseListener.php

Line Element Reason
17 BaseListener

As of Feb 2024, still used by Mosaico releases. Need at least a year to phase-out.

Services.php

Line Element Reason
96 Services::applyStaticFactory()

Friend.php

Line Element Reason
53 CRM_Friend_BAO_Friend::retrieve()

MockV4ReflectionGrandchild.php

Line Element Reason
39 MockV4ReflectionGrandchild::deprecatedFn()

CiviUnitTestCase.php

Line Element Reason
3837 CiviUnitTestCase::retrieveEntityFinancialTrxn()
  • only called by tests - to be replaced with $trxn = (array) EntityFinancialTrxn::get() ->addWhere('id', '=', $contributionID) ->addWhere('entity_table', '=', 'civicrm_contribution') ->addSelect('*')->execute();
3837 CiviUnitTestCase::retrieveEntityFinancialTrxn()
  • this was used so much in tests I copied it over - but it should go.... the tests just need to use the api.

ConfirmTest.php

Line Element Reason
376 CRM_Contribute_Form_Contribution_ConfirmTest::submitFormWithMembershipAndContribution()

see testSeparatePaymentWithTax for preferred way to get valid config.

ConfirmTest.php

Line Element Reason
582 CRM_Event_Form_Registration_ConfirmTest::submitFormLegacy()

use SubmitForm

Search results