This post is part of the ClassicPress Plugin Development series in which I am going to look at both best practice for developing plugins and how I approach some requirements as well as some of the functions I commonly use.
When developing plugins for ClassicPress, you need to develop using semantic versioning (or semver) as this will be a requirement of the ClassicPress Directory.
Semantic Versioning is a versioning scheme for using meaningful version numbers which can be used to avoid incompatibilities.
semver version numbering works using three segments:
- MAJOR version when you make breaking changes where users will need to take some action during an upgrade.
- MINOR version when you add functionality in a backwards compatible manner which users can simply apply without taking any other action.
- PATCH version when you make backwards compatible bug fixes which, like MINOR versions users can apply without taking any other action.
One key point to note when using semver, is that when a versioned release has been made, nothing in that release can be changed; a new version with incremented number must be released instead.
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format; pre-release versions often have a MAJOR version number of
0. When a plugin is ready for release to production it should be released as version 1.0.0.