On Sun, Aug 15, 2010 at 7:27 AM, Niklas Laxström niklas.laxstrom@gmail.com wrote:
The issue of how to use @since annotations recently came up in the code review. Those are essential for extension developers who want to target multiple MediaWiki versions with one codebase. I think we should come up a standard way to use those.
I think @since annotations are probably useless. You can't reliably tell if an extension will work on an old version without actually testing it on the old version, and if you do that, you can figure out what works by the error messages. Just because a method or class was present doesn't mean it worked the same way, so @since is not enough. It's got to be less work to just try it than to check every single one of the dozens or hundreds of methods you use for compatibility, too (which no one is going to do).
If you do want to find out if a method is in the version you're targeting, there's a very easy way: check out the branch in SVN and look in the file. Or use ViewVC. It's not really harder than looking in the source code. On the other hand, manually adding @since clutters the comments, makes that much less code fit on one screen, and will create zillions of cleanup commits (which we already have too many of).
So I think we shouldn't use @since at all, personally.