After .9 comes .10: only the last position counts
This page is for designers who reach a version ending in .9 and wonder whether the next one is .10 or a jump to the
next higher position.
The rule
Only the last position increments. 0.0.4.9 is followed by 0.0.4.10, then 0.0.4.11, never 0.0.5.0.
The last position is a whole number and keeps counting. There is no running out of digits. Moving a position above it is a decision about what the release means (Choosing a version number), never a consequence of reaching nine.
Why it is safe
| Tool | How it orders x.10 after x.9 |
|---|---|
| Composer and Packagist | They normalize versions and compare each position as a number |
| GitHub Releases | Ordered by the date of the tag, not by its name |
git tag --sort=version:refname, sort -V | Compare positions as numbers |
A constraint ~1.0.9 | Means >=1.0.9 <1.1.0, so 1.0.10 is inside it |
The Exponential project checked this on its own releases: a .10 release after a .9 was ordered after it on both
Packagist and GitHub.
The one trap
A plain sort by name puts .10 before .8:
git tag -l 'v1.0.*' | tail -1 # can print v1.0.9 wrong
git tag -l 'v1.0.*' --sort=version:refname # ends with v1.0.10 right
git tag -l 'v1.0.*' | sort -V | tail -1 # v1.0.10 rightAny script of yours that picks "the newest tag" needs --sort=version:refname or sort -V
(Sorting tags correctly).
Step by step at a .9
- Confirm the highest published version is
x.y.9(both tags and releases). - Write
x.y.10into the version fields. - Commit, tag
vx.y.10, push, release. - Check Packagist: the new version is listed first.
Related pages
- Version constraints your users write
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.