My business partner and I are developing several plugins and we want to know if there is a standard for the version number of a plugin when there are updates, i.e., version 1.0, version 1.2, version 1.2.3, etc?
Thanks for any advise.
|
My business partner and I are developing several plugins and we want to know if there is a standard for the version number of a plugin when there are updates, i.e., version 1.0, version 1.2, version 1.2.3, etc? Thanks for any advise. |
|||
|
|
|
No, there is no standard. You can even use names, roman numerals or whatever, but I would not recommend it. Most authors use Semantic Versioning: This has several drawbacks:
In practice, Semantic Versioning isn’t that semantic. I prefer the date as version number:
Recommended reading:
Both schemes work. The difference is mostly in the user experience. |
|||||||
|
|
The standard for version numbers in PHP works like this: MAJOR dot MINOR dot REVISION Each of these is an integer, and independent from the rest. It is not a decimal number. This is important because of how version_compare works. MAJOR is the major version. You'd update this number after a major change to the code, such as completely revamping the way the code works. MINOR is the minor version. You'd update this number after a minor change to the code, such as adding a new feature. REVISION is a revision number. You'd update this after a change to an existing minor version, such as a bugfix. Now, again versions are integers separated by dots. So, because of this, version 1.1 = 1.01 ; both of those version numbers are identical, the major version is 1, the minor version is 1. For another example, version 1.9 is less than version 1.10 ; the minor version has changed from nine to ten. Because WordPress uses the version_compare function of PHP, you kinda have to follow these methods for version numbering. Note that WordPress itself is an exception in a minor way, in that the core goes from 2.9 to 3.0. This is legacy, and just the way they've always done numbering. It's compatible with the version_compare function, but generally speaking one should go from 2.9 to 2.10 if there's no significant rewrite to justify the major version bump. |
|||
|
|