Topic on Talk:Best practices for extensions

Jump to navigation Jump to search
Samwilson (talkcontribs)

Current wording: "Prominent version-number indication in the README and main PHP files (ideally all files)".

I take it this is for the version a file (or method, etc.) was introduced? Not that the current version number should be added to every file (apart from the readme and extension.json).

And also: do version numbers for extensions actually mean anything? What are they used for (other than for display in Special:Version)?

Thiemo Kreuz (WMDE) (talkcontribs)

If a version number is not actively used as a tool for communication, it is indeed pretty worthless. More and more MediaWiki extensions just remove the version number because of this.

This is different for smaller code libraries that – ideally – follow semantic versioning. These can also use @since tags – which is the only situation where I find version numbers helpful.

I would not copy-paste a version number around, even if an extension still uses one. What would be the benefit of that? The biggest problem with having the same version number in multiple "prominent" places is that they must all be updated. Every time. No, please don't do this. Have it in extension.json if it still means something for the main developers of an extension. Otherwise, just remove it.

Reply to "Version numbers in all files?"