This extension offers in-line replacements for deprecated and abandoned CiviCRM Core functions
The extension is licensed under AGPL-3.0.
The purpose of this extension is to offer replacements for functions that have been deprecated or even removed from the CiviCRM Core.
Of course, you should resolving this by replacing these function calls with a well-designed piece of code to exactly the same thing that the old function did for you, but in a clean and up-to-date way. Since that might be a lot of work, we designed this extension to offer a quick, temporary solution to your extensions' compatibility issues.
grep -r -E "(CRM_Utils_Token::replaceOrgTokens|CRM_Activity_Form_Task_PDFLetterCommon|PDFLetterCommon::postProcess|CRM_Core_OptionGroup::getValue|CRM_Core_OptionGroup::getLabel|CRM_Contact_BAO_Contact::contactTrashRestore|CRM_Contact_BAO_Contact::getPhoneDetails|CRM_Core_DAO::checkFieldExists|CRM_Contact_BAO_Contact::getPhoneDetails|CRM_Core_DAO::createTempTableName|civicrm_api3_field_names|ation::deleteLocationBlocks|ipn_process_transaction|CRM_Core_Form_Date::buildDateRange|CRM_Core_Form_Date::returnDateRangeSelector|CRM_Core_Form_Date::addDateRangeToForm|CRM_Core_DAO::executeSql)" *
You can also run this one, to find all problematic calls, i.e. deprecated and removed:
grep -r -E "(CRM_Utils_Token::replaceOrgTokens|CRM_Activity_Form_Task_PDFLetterCommon|PDFLetterCommon::postProcess|CRM_Core_OptionGroup::getValue|CRM_Core_OptionGroup::getLabel|CRM_Contact_BAO_Contact::contactTrashRestore|CRM_Contact_BAO_Contact::getPhoneDetails|CRM_Core_DAO::checkFieldExists|CRM_Contact_BAO_Contact::getPhoneDetails|CRM_Core_DAO::createTempTableName|civicrm_api3_field_names|ation::deleteLocationBlocks|ipn_process_transaction|CRM_Core_Form_Date::buildDateRange|CRM_Core_Form_Date::returnDateRangeSelector|CRM_Core_Form_Date::addDateRangeToForm|CRM_Core_Error::debug_log_message|CRM_Core_DAO::executeSql|::getContactRelationshipSelector|::getContactRelationships)" *
lagacycode
extension as part of it's dependencies, i.e. add the following to your extensions' info.xml
:
<requires>
<ext>legacycode</ext>
</requires>
lagacycode
extension
<requires>
<ext>legacycode</ext>
</requires>
CRM_Legacycode_OptionGroup::getValue
CRM/EXTENSION/Legacycode/OptionGroup.php
, where 'EXTENSION' should be your extension's namespace.CRM_Mything_Legacycode_OptionGroup
CRM_Mything_Legacycode_OptionGroup::getValue
You can find an example here
Function | Replacement | Deprecated Since | Dropped Since |
---|---|---|---|
CRM_Core_DAO::executeSql |
todo | ? | no idea, but old |
PDFLetterCommon::postProcess |
todo | ? | 5.57 |
CRM_Activity_Form_Task_PDFLetterCommon |
todo | ? | 5.57 |
CRM_Utils_Token::replaceOrgTokens |
todo | ? | 5.57 |
CRM_Core_OptionGroup::getValue |
CRM_Legacycode_OptionGroup::getValue | ? | 5.60 |
CRM_Core_OptionGroup::getLabel |
CRM_Legacycode_OptionGroup::getLabel | ? | 5.60 |
CRM_Contact_BAO_Contact::contactTrashRestore |
todo | ? | 5.60 |
CRM_Core_DAO::checkFieldExists |
todo | ? | 5.60 |
CRM_Contact_BAO_Contact::getPhoneDetails |
todo | ? | 5.60 |
CRM_Core_DAO::createTempTableName |
CRM_Legacycode_Core_DAO::createTempTableName | ? | 5.60 |
civicrm_api3_field_names |
todo | ? | 5.60 |
CRM_Core_BAO_Location::deleteLocationBlocks |
todo | ? | 5.60 |
ipn_process_transaction |
todo | ? | 5.60 |
CRM_Core_Form_Date::buildDateRange |
CRM_Legacycode_Date::buildDateRange | ? | 5.61 |
CRM_Core_Form_Date::returnDateRangeSelector |
CRM_Legacycode_Date::returnDateRangeSelector | ? | 5.61 |
CRM_Core_Form_Date::addDateRangeToForm |
CRM_Legacycode_Date::addDateRangeToForm | ? | 5.61 |
CRM_Contact_BAO_Relationship::getContactRelationshipSelector |
? | ? | 5.74 |
CRM_Contact_Page_AJAX::getContactRelationships |
? | ? | 5.74 |
CRM_Core_Error::debug_log_message |
Civi::log()->debug | ? | not yet |
(more to come) | todo |
Since this aims to be a collection of some very volatile information, PRs are very welcome!