Evan Prodromou wrote:
On Thu, 2006-10-26 at 11:45 -0400, Travis Derouin wrote:
Both seem sort of messy. Are there any plans to broaden the range of hooks other than by just adding more instances of hooks?
I don't think so. I don't think the idea of modifying the profile stuff is a good idea, since the hooks that work now take (sometimes modifiable) arguments, which don't get passed to the profiling commands.
I'm interested in expanding the scope of hooks, so suggestions for places to put them are very welcome. Are there places that you think there should be hooks, that they don't exist?
Eventually I'd like every "function point" in MediaWiki to be hookable. But collecting the most important actions that require hooks will probably be useful.
The problem is that MediaWiki changes. If you add more hooks, then more of them will break between versions. As a core developer, I don't want to have to fix dozens of checked-in extensions every time I make a change, or to break all the externally maintained ones. There are "good quality" hooks, which have had the same functionality since hooks were invented, and can be expected to retain that functionality for the forseeable future. And there are bad hooks, which have been broken since the time they were introduced, and will be removed ASAP. You both seem to be suggesting that we should add many more of the latter kind.
If you want to make a change, and you don't mind if it's broken by the next minor release, why not just make a patch? I think I would prefer it if we tried to make hooks a stable extension API rather than the runtime equivalent of a source patch.
-- Tim Starling