View Issue Details

IDProjectCategoryView StatusLast Update
5433Composrcorepublic2024-07-24 22:11
ReporterPDStig Assigned ToGuest  
PrioritynormalSeverityfeature 
Status newResolutionopen 
Summary5433: 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
Attach Tags
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

Chris Graham

2024-07-24 21:52

administrator   ~8910

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

PDStig

2024-07-24 22:06

administrator   ~8912

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   ~8913

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.

Add Note

View Status
Note
Upload Files
Maximum size: 32,768 KiB

Attach files by dragging & dropping, selecting or pasting them.
You are not logged in You are not logged in. This means you will not get any e-mail notifications. And if you reply, we will not know for sure you are the original poster of the issue.

Issue History

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