Repository navigation
[3.0] Move to dedicated Hooks table - #8808
jdarwood007 wants to merge 21 commits into
Conversation
Sets up a dedicated hooks table for our integrations. Deprecates using modSettings to store integrations. Deprecates integrate_ prefix to hook names Adds compatibility with SMF 2.1 logic.
# Conflicts: # Sources/Actions/Admin/Maintenance.php # Sources/IntegrationHook.php
# Conflicts: # Sources/Config.php
Co-authored-by: John Rayes <live627@gmail.com>
|
I closed #9700 in favour of this. Comparing the two turned up a mismatch here, as of 9ab5a9b: The schema declares the ownership column as SMF/Sources/Db/Schema/v3_0/Hooks.php Lines 87 to 93 in 9ab5a9b Everything that reads or writes it uses
So every hook query names a column that does not exist. The type differs too: the value passed in is On a possible addition: this stores which package owns each hook and carries |
# Conflicts: # Sources/Actions/Admin/Maintenance.php # Sources/Config.php # Sources/IntegrationHook.php # Sources/Maintenance/Tools/Upgrade.php
389b66c to
32e2938
Compare
ec6736a to
62bdfe9
Compare
Autoloader fixes ErrorhandlerService fixes
62bdfe9 to
daea48c
Compare
cafaa45 to
5d20c9f
Compare
|
@albertlast I don't understand what it is complaining about here. |
|
Soon as I got phpunit to spit out some debug data... |
Sets up a dedicated hooks table for our integrations. Hooks have become very important to our code base to ensure our mod authors are able to tap into the code where needed without needing to alter the source code. As such we should build a more efficient setup for storing and maintaining those hooks.
integrate_prefix to hook namesI have toyed with the idea of fully removing all
integrate_from all files. Not sure if it's relevant to this PR. But since we are now storing hooks in their table, we don't need to have the prefix. Looking for any feedback on that, I am thinking it should be done and let the IntegrationHooks logic handle restoring it for compatibility with SMF 2.1 where needed.I need to do more testing here as this changes a lot and I have only done some basic mod tests.