View Issue Details

IDProjectCategoryView StatusLast Update
0005433Composrcorepublic2024-07-24 22:11
ReporterPatrick SchmalstigAssigned To 
SeverityFeature-request 
Status non-assignedResolutionopen 
Product Version 
Fixed in Version 
Summary0005433: Improve database_relations with hooks
DescriptionCurrently, database relations are defined in database_relations.php . However, get_table_purpose_flags, get_table_descriptions, and get_relation_map are usually addon-based.

Perhaps migrate these to addon_registry hook functions for relevant addons.

Another nice feature we could possibly add is a unit test that checks get_relation_map and ensures that, when mapping to fields of tables in other addons (as defined in get_table_purpose_flags perhaps), the relevant addons are listed under "requires" or "recommends" and is not listed under "conflicts with".
TagsRoadmap: Over the horizon
Time estimation (hours)
Sponsorship open

Activities

Chris Graham

2024-07-24 21:52

administrator   ~0008910

I agree with most of this except I'd prefer actually addon_registry hooks get smaller, not bigger. Just make a new hook type.

Patrick Schmalstig

2024-07-24 22:06

administrator   ~0008912

How about we put them in the info functions of the modules instead, since that's where the tables get created anyhow?

Chris Graham

2024-07-24 22:11

administrator   ~0008913

It uses considerable memory loading up metadata from a lot of files. We have a hack to pull in individual functions from classes so we don't generally take the hit of parsing all the PHP files at once, but even then we don't want to have information in there that is only needed for obscure stuff like docs generation or testing.

Issue History

Date Modified Username Field Change
2023-11-04 03:08 Patrick Schmalstig New Issue
2024-03-30 14:04 Patrick Schmalstig Tag Attached: Roadmap: Over the horizon
2024-03-30 14:04 Patrick Schmalstig Project Composr alpha bug reports => Composr
2024-03-30 14:28 Patrick Schmalstig Category General / Uncategorised => core
2024-07-24 21:52 Chris Graham Note Added: 0008910
2024-07-24 22:06 Patrick Schmalstig Note Added: 0008912
2024-07-24 22:11 Chris Graham Note Added: 0008913