[development] important reminder: do not use API functions inupdate code

Daniel F. Kudwien news at unleashedmind.com
Tue Dec 4 16:07:26 UTC 2007


> On Dec 4, 2007 5:14 PM, Gerhard Killesreiter 
> <gerhard at killesreiter.de> wrote:
> > I am in favour of dropping the code for version-hopping updates. It 
> > has always been a PITA to maintain it. If we leave it in, 
> we need to 
> > fix it, though. Let's simply remove it.
> 
> OK, that avoids some of the problems (anyone up for an issue).
> 
> The original note still applies to anyone writing updates.
> 
> Gabor

Just curious: Wouldn't it make sense to move all _old_ API functions as stub
functions into a new update_api.inc (or similar named file) that is only
included by update.php?

Example:

function menu_rebuild() {
  ...calls to new API functions...
}

So we wouldn't loose version-hopping and would probably get a nice overview
of old API functions along with their new replacements. If properly
documented with phpdoc blocks, this *could* be a neat replacement for our
module update handbook pages.

sun



More information about the development mailing list