-
- Downloads
extension-compatibility - Add 'force-uninstall' mode for api4 transition
There is a compatibility problem when upgrading a system which has an old copy of api4: the top level `api4.php` indiscriminately declares the function `civicrm_api4()`, which eventually provokes a conflict with the copy that is now in `civicrm-core`. Using the normal disable/uninstall actions doesn't resolve this because the error arises too early during boot (before the upgrader gets a chance to remove the extension). The 'force-uninstall' option will make the system behave as if the extension is uninstalled, regardless of what files exist and what state may be stored in the `civicrm_extension` table. This commit technically does ~3 things: 1. Changes the policy for `org.civicrm.api4` to use `force-uninstall` 2. Makes the extension-cache version-dependent. During an upgrade, you might have a stale cache that claims that the old extension is active. This ensures that (as soon as you drop in new code) it begins working with a fresh cache. 3. Update any spots which query the table `civicrm_extensions` for extension status. Have it consult `extension-compatibility.json` for `force-uninstall`ed items.
Showing
- CRM/Core/PseudoConstant.php 4 additions, 0 deletionsCRM/Core/PseudoConstant.php
- CRM/Extension/Manager.php 6 additions, 1 deletionCRM/Extension/Manager.php
- CRM/Extension/Mapper.php 5 additions, 0 deletionsCRM/Extension/Mapper.php
- CRM/Extension/System.php 1 addition, 1 deletionCRM/Extension/System.php
- extension-compatibility.json 1 addition, 2 deletionsextension-compatibility.json
Please register or sign in to comment