After posting an early version of this script on gitter.im/suitecrm/Lobby I was encouraged by @pgr to post about it here.
Perhaps it will spark a discussion on the handling of logic hooks, and a more sane method will arise.
Until then, you can find my script here: https://github.com/OffsiteGuru/logichookmanager
In short, this script parses php files that have logic hooks defined, and programmatically adds them to the logic_hook.php files using data from the functions phpdoc comments.
I put this together because keeping track of which hook functions were being used was getting crazy with the amount of code I was working with. It also makes it possible to use a separate git repo to manage both the hook code and where it’s enabled.
The functions I’ve written should be pretty easy to adapt if we want to roll this functionality into SuiteCRM proper.
With this in place, adding a logic hook to an install would be as simple as dropping a php file in the directory, running the script, then a quick repair.
I wonder if the quick repair functions needed could be run by this script… hmmm