PHPackages                             phpextra/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. phpextra/version

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

phpextra/version
================

Version management class

1.0.0(12y ago)116MITPHP

Since Apr 11Pushed 11y ago1 watchersCompare

[ Source](https://github.com/phpextra/version)[ Packagist](https://packagist.org/packages/phpextra/version)[ RSS](/packages/phpextra-version/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

\#Version library [![Build Status](https://camo.githubusercontent.com/4ef44b690b6266454f5148f28ad891823465d4861b5335cdd769f7fe51f6be50/68747470733a2f2f7472617669732d63692e6f72672f70687065787472612f76657273696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/phpextra/version)

This library is a wrapper for [herrera-io/php-version](https://github.com/herrera-io/php-version).

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

[](#installation)

`Version` can be installed via [Composer](https://github.com/composer/composer):

```
{
    "require": {
        "phpextra/version": "~1.0"
    }
}
```

\##Usage namespace PHPExtra\\Version;

```
$version1 = Version::fromString('1.0.0');
$version2 = Version::fromString('1.0.0-rc1');
$version3 = Version::fromString('0.9.0-beta');

$version1->isEarlierThan($version2);

> true

$version1->isLaterThan($version3);

> true

$version1->isEqualTo($version1);

> true

$version1->compare($version1);

> 0
$version1->compare($version2);

> -1

$version1->compare($version3);

> 1

echo (string)$version1;
> 1.0.0

```

\##Contributing

All code contributions must go through a pull request. Fork the project, create a feature branch, and send me a pull request. To ensure a consistent code base, you should make sure the code follows the [coding standards](http://symfony.com/doc/2.0/contributing/code/standards.html). If you would like to help take a look at the [list of issues](https://github.com/phpextra/version/issues).

\##Requirements

See **composer.json** for a full list of dependencies.

\##Authors

Jacek Kobus -

License information
-------------------

[](#license-information)

```
See the file LICENSE.txt for copying permission.

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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

4416d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/85f3695da9474a49d00d00449442d8f8bcbc21abfcae1c9d51a2762d0cad87f7?d=identicon)[jkobus](/maintainers/jkobus)

---

Top Contributors

[![cmthornton](https://avatars.githubusercontent.com/u/3152061?v=4)](https://github.com/cmthornton "cmthornton (2 commits)")[![jkobus](https://avatars.githubusercontent.com/u/1527096?v=4)](https://github.com/jkobus "jkobus (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[hashandsalt/kirby3-schema

Kirby 3 - Schema

171.7k1](/packages/hashandsalt-kirby3-schema)

PHPackages © 2026

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