[development] Module updater module

Angela Byron drupal-devel at webchick.net
Wed Nov 22 06:40:12 UTC 2006


I set out to port my 3rd or 4th module to 5.x today, and started  
doing calculations about time/effort spent per module, and also  
started musing about the fact that I needed some way to flex my regex  
muscles, so I came up with this:

http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/webchick/ 
module_updater/

it's in my sandbox rather than an actual project, because about 10  
hours into it when I only had a couple functions written, it started  
to get really daunting and I wasn't sure if I really wanted to  
continue working on it or not. ;P I'll see again in the morning. ;)

In the meantime:

- It generates an .info file and removes the description from  
hook_help (or hook_help altogether if that's all that was in it)
- It adds a menu item for any hook_settings() and changes the return  
$form to return system_settings_form($form)
- It replaces user_mail with drupal_mail() and generates a unique  
$mailkey for each instance.
- It replaces module_exist with module_exists() ;)
- It replaces user_mail_wrapper with drupal_mail_wrapper. :P
- It also provides documentation for certain changes so that people  
can alter the "guess" behaviour that the script has to do (ex:  
dependencies in .info files)
- It drupal_set_message()s any changes that it made so that you can  
go back and correct the work if necessary.

It is also probably horribly buggy and has a very long way to go  
before all of the items at http://drupal.org/node/64279 are covered  
(I've created skeleton functions in the .inc file for all transition  
issues). The next ones I'll probably focus on are the t() changes,  
the hook_view changes, and the hook_link changes, as those have all  
bit me before.

But anyway, if someone wants to take a look, it's there. Or, if  
someone wants to work on it with me for some reason, let me know!  
Thanks to eaton, merlinofchaos, dopry and whoever else was in #drupal  
at the time who helped me brainstorm about this. :)

-Angie



More information about the development mailing list