Open jensschuppe opened 1 year ago
This looks very similar to https://github.com/systopia/de.systopia.twingle/issues/42, see implementation here: https://github.com/systopia/de.systopia.twingle/commit/85081dc3ab3bc2b8e1f004b5bcf0c9cc103ec9fe
This is, however, a lightweight approach without its own entity.
I'd really prefer BAO entities, as we get an API and all the database stuff for free. Those profiles really are (configuration) entities semantically. Also, providing default data (or example configuration) would be so much easier by just exporting a managed entity.
I'm just not sure how well supported the JSON data type or serialization is with DAOs (I remember things changing in Core regarding serialization). That's to say I'd still keep profile data in a single data blob for better expandability, apart from generic properties like id
, name
and the like.
Since we're having at least three extensions implementing a configuration profile model, it might be worth considering a generic approach by providing a ConfigProfile
entity with a type
column. What do you think, @bjendres?
What do you think, @bjendres?
Sounds great, provided we have funding for that.
This should eventually make use of systopia/config-profiles.
Currently, all profiles are stored in a unique CiviCRM settings object, which is prone to violate length restrictions for a single settings entry, which is 65K. Due to a possibly unlimited number of contact fields and settings for them being stored within the profile, using CiviCRM settings doesn't scale properly.
Instead, a separate data structure (e.g. as in systopia/de.systopia.donrec#92 or as CiviCRM entities) should be used and the current settings be migrated in an upgrade task.