PHPackages                             cubedtear/semver - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. cubedtear/semver

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

cubedtear/semver
================

Semantic versioning string parsing and comparison library.

v1.1.0(3y ago)45MITPHPPHP &gt;=8.1

Since Nov 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/cubedtear/php-semver)[ Packagist](https://packagist.org/packages/cubedtear/semver)[ RSS](/packages/cubedtear-semver/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

cubedtear/semver
================

[](#cubedtearsemver)

Simple PHP library to parse and compare [Semantic Versioning](https://semver.org/) versions.

Installation
------------

[](#installation)

Install the latest version with:

```
$ composer require cubedtear/semver
```

Requirements
------------

[](#requirements)

- PHP 8.1 is required but using the latest version of PHP is highly recommended.

Basic usage
-----------

[](#basic-usage)

```
use Cubedtear\Semver\Version;

$v1 = Version::parse("0.1.1");
$v2 = Version::parse("0.1.1-alpha");
$v3 = Version::parse("1.0.12-beta+ff12b4d8");

if (Version::compare($v1, $v2)) {
    ...
}

if (Version::compare("0.1.1", "0.1.0")) {
    ...
}
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1314d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1618573?v=4)[Aritz Lopez](/maintainers/cubedtear)[@cubedtear](https://github.com/cubedtear)

---

Top Contributors

[![cubedtear](https://avatars.githubusercontent.com/u/1618573?v=4)](https://github.com/cubedtear "cubedtear (3 commits)")

---

Tags

semverversionsemantic versioning

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cubedtear-semver/health.svg)

```
[![Health](https://phpackages.com/badges/cubedtear-semver/health.svg)](https://phpackages.com/packages/cubedtear-semver)
```

###  Alternatives

[nikolaposa/version

Value Object that represents a SemVer-compliant version number.

1407.3M23](/packages/nikolaposa-version)[liip/rmt

Release Management Tool: a handy tool to help releasing new version of your software

461462.8k78](/packages/liip-rmt)[tomzx/php-semver-checker

PHP Semantic Versioning Checker

435239.2k2](/packages/tomzx-php-semver-checker)[shivas/versioning-bundle

Symfony application versioning, simple console command to manage version (with providers e.g. git tag) of your application using Semantic Versioning 2.0.0 recommendations

1111.3M1](/packages/shivas-versioning-bundle)[melbahja/semver

PHP Semantic Versioning Parser and Comparator

2123.5k5](/packages/melbahja-semver)[z4kn4fein/php-semver

Semantic Versioning library for PHP. It implements the full semantic version 2.0.0 specification and provides ability to parse, compare, and increment semantic versions along with validation against constraints.

261.7M18](/packages/z4kn4fein-php-semver)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
