PHPackages                             arkuuu/semantic-version - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. arkuuu/semantic-version

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

arkuuu/semantic-version
=======================

A small tool to handle semantic versions and their comparison

v0.1.0(6y ago)01MITPHPPHP ^7.1CI failing

Since Dec 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/arkuuu/semantic-version)[ Packagist](https://packagist.org/packages/arkuuu/semantic-version)[ RSS](/packages/arkuuu-semantic-version/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

SemanticVersion
===============

[](#semanticversion)

A small PHP library to handle semantic versions and compare them to each other.

This is a small library with restricted real life use. I mainly created it to practice unit testing, github actions and publishing to packagist. If you really need a library like this, try [Composer\\Semver](https://packagist.org/packages/composer/semver).

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

[](#installation)

Use composer to install from packagist.

```
composer require arkuuu/semantic-version
```

Usage
-----

[](#usage)

```
$currentVersion = new Version('1.0.17');
$minimalVersion = new Version('1.0');
$versionOk = $currentVersion->isGreaterOrEqual($minimalVersion);
// $versionOk will be "true"

$versionA = new Version('1.0.17');
$versionB = new Version('1.0.25');
$sameVersions = $versionA->isSame($versionB);
// $sameVersions will be "false"
```

Ideas for the future
--------------------

[](#ideas-for-the-future)

- Refactor comparisons into own class
- Support check against version constraints (`^`, `~` etc)
- Support wildcards (e.g. `1.4.*`)
- Support more comparisons (e.g. *less than*)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

2345d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c3fcd5041778da37ab90b3218f4a410a6a4db91d05c2ce1d7c2e60574fa18694?d=identicon)[arkuuu](/maintainers/arkuuu)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/arkuuu-semantic-version/health.svg)

```
[![Health](https://phpackages.com/badges/arkuuu-semantic-version/health.svg)](https://phpackages.com/packages/arkuuu-semantic-version)
```

###  Alternatives

[aferrandini/urlizer

Library for urlizer

24768.2k8](/packages/aferrandini-urlizer)[coderevolutionplugins/gpt-3-encoder-php

PHP BPE Text Encoder/Decoder for GPT-2 / GPT-3

10046.1k](/packages/coderevolutionplugins-gpt-3-encoder-php)[cjstroud/classnames-php

A simple PHP utility for conditionally joining classNames together

20166.9k1](/packages/cjstroud-classnames-php)

PHPackages © 2026

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