Finish making legacycustomsearches optional
Our long term goal is to stop supporting the legacycustomsearch framework (and eventually the rest of the legacy search framework). We have a way to go before this is possible. However, we are already providing de facto limited support for the extension in that we are really only doing the following:
- doing work that involves getting the extension code out of core & into the core extension
- doing php8.2 updates (begrudingly)
- merging bug fixes
- addressing regressions
This mostly means that features, in particular, are no longer being added.
We are now in a good position to work towards the interim goal of shipping CiviCRM with the extension disabled.
In order to do this I have found a few places where the extension needs to come out of the core code
-
ThefillPrevNextCache
functionality - this doesn't need to be shared with the core search - and by unsharing we can simplify all thatisCoreSearch
stuff. I put up a PR after doing universe grepping https://github.com/civicrm/civicrm-core/pull/25392 -
The export task functionality - a separate path for the custom searches is embedded in the core searches. I got this within a whisper of working in the past & will try to revive that work https://github.com/civicrm/civicrm-core/pull/25504 -
CRM_Contact_BAO_SearchCustom
needs to be moved to the extension -
The shared but nah-not-really code incontactIDSQL
needs to come out of the core code -
This is probably the one that needs most thought - the code to build the group contact cache needs to not be called directly from that class - ie we need a listener of some sort available - currently the code is 'if api4 then x, if custom search then y, if legacy core search then z' - so all 3 would probably 'listen & do'https://github.com/civicrm/civicrm-core/pull/26611
-
Query formatter appears to be entirely part of the FullTextSearchCRM_Utils_QueryFormatter
-
Many but not all of these places are covered above - but they all need to be out of
CRM