Do you use Semantic Versioning?

Semantic Versioning is a neat and practical approach to increasing the version of your app/package in a way that’s predictable to both machines and humans. You can read about it here.

Most the quality PHP packages out there use semver, and if you fetch something via Packagist, there’s a high chance the project respects semver - especially if it’s an up to date one - and if it’s on Packagist, there’s more chance it is than that it isn’t.

Recently, a cute new project popped up. PHP Semver Checker analyzes your code - in a before and after state (e.g. before and after a commit) - and tells you which version number to bump. In other words, it’ll tell you whether to do a Major, Minor or Patch increment on your package’s version. You can read all about it in the Github repo’s README.

With Semver becoming more widely adopted (and, by virtue of tools such as Semver Checker, easier to implement), will you use it in your projects? Do you use it already? If so, how long have you been using it, and, if not, why?

Would you like to see Semver related content on SitePoint - articles going in depth?

Lemme know!

Why does everything have to be semantic? Why can’t it just remain a “standard”, which that basically is. That versioning standard has been around for probably 20 years by now (it certainly didn’t start with php) - why does it need a new term.

1 Like

MS-DOS 1.0.0 was released in 1981 and the standard had been around for a long time before that. Probably dates back to the 1960s or even the 50s.

So your probably 20 years isn’t even close.

I’m not familiar with the etymology of the term “Semantic Versioning”, I guess those who (re)named it as such had their reasons. But being able to address the standard by a more specific name in circles unfamiliar with it does have its value.

“Why not?”
Because Windows 8.1.91822319 just doesnt have that ring to it… :stuck_out_tongue_winking_eye:

Though really, in any actual software production environment, you’ll find this. Without the fancy executive-speak name, and probably just called “the version number.”

:smile:

In one shape or another, but it’s the variations that matter. Even in companies where I’ve seen it implemented, the spec as outlined on the SemVer site wasn’t followed as religiously as it should have been, in my opinion. I think embracing the version with its “executive-speak” name (and, by definition, its full specification as a rigid rule) is a good approach, despite the fact that the versioning style has been in existence and implicitly followed by many for decades.

I’ve been following it for the past couple years but I made a script that makes it super easy to track http://github.com/mlantz/semantix
I was in need of a way to track PHP builds and a way to track a version number that wasnt just a GIT referemce number.

1 Like

Nice!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.