PHPackages                             roadrunner-php/version-checker - 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. roadrunner-php/version-checker

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

roadrunner-php/version-checker
==============================

The package for checking the version of the RoadRunner

v1.1.0(4mo ago)32.6M↓42.3%3[2 PRs](https://github.com/roadrunner-php/version-checker/pulls)1MITPHPPHP ^8.0CI passing

Since May 25Pushed 4mo ago4 watchersCompare

[ Source](https://github.com/roadrunner-php/version-checker)[ Packagist](https://packagist.org/packages/roadrunner-php/version-checker)[ Docs](https://github.com/roadrunner-php/version-checker)[ GitHub Sponsors](https://github.com/roadrunner-server)[ RSS](/packages/roadrunner-php-version-checker/feed)WikiDiscussions 1.x Synced 2d ago

READMEChangelog (4)Dependencies (6)Versions (6)Used By (1)

RoadRunner VersionChecker
=========================

[](#roadrunner-versionchecker)

[![PHP Version Require](https://camo.githubusercontent.com/d10b70733a02332dfb52392d59cfac2d7da8b75a2d50936ecaf7bfa2a1455faf/68747470733a2f2f706f7365722e707567782e6f72672f726f616472756e6e65722d7068702f76657273696f6e2d636865636b65722f726571756972652f706870)](https://packagist.org/packages/roadrunner-php/version-checker)[![Latest Stable Version](https://camo.githubusercontent.com/e296117d97aaf0740e895f2bdc30f7e580814b72a46392641981c673f3a3bb01/68747470733a2f2f706f7365722e707567782e6f72672f726f616472756e6e65722d7068702f76657273696f6e2d636865636b65722f762f737461626c65)](https://packagist.org/packages/roadrunner-php/version-checker)[![phpunit](https://github.com/roadrunner-php/version-checker/actions/workflows/phpunit.yml/badge.svg)](https://github.com/roadrunner-php/version-checker/actions)[![psalm](https://github.com/roadrunner-php/version-checker/actions/workflows/psalm.yml/badge.svg)](https://github.com/roadrunner-php/version-checker/actions)[![Codecov](https://camo.githubusercontent.com/bc9b753e3af61ac9f49eae45a18996c4098858db19eef06522732674b3dcf027/68747470733a2f2f636f6465636f762e696f2f67682f726f616472756e6e65722d7068702f76657273696f6e2d636865636b65722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/roadrunner-php/version-checker)[![Total Downloads](https://camo.githubusercontent.com/62cf755cd6f5dc61df5408b7fafa21134ec73e7c469c7629093249102aaf5cef/68747470733a2f2f706f7365722e707567782e6f72672f726f616472756e6e65722d7068702f76657273696f6e2d636865636b65722f646f776e6c6f616473)](https://packagist.org/roadrunner-php/version-checker/phpunit)[![](https://camo.githubusercontent.com/4442b73a11753b80fdd7b442ddbfaf8383902c8b9ffa66ed1718e8c62e102f2e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646973636f72642d636861742d6d6167656e74612e737667)](https://discord.gg/8bZsjYhVVk)

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

[](#requirements)

Make sure that your server is configured with following PHP version and extensions:

- PHP 8.0+

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

[](#installation)

You can install the package via composer:

```
composer require roadrunner-php/version-checker
```

Usage
-----

[](#usage)

Use the `RoadRunner\VersionChecker\VersionChecker` methods to check the compatibility of the installed RoadRunner version. The VersionChecker class has three public methods:

- **greaterThan** - Checks if the installed version of RoadRunner is **greater than or equal** to the specified version. If no version is specified, the minimum required version will be determined based on the minimum required version of the `spiral/roadrunner` package.
- **lessThan** - Checks if the installed version of RoadRunner is **less than or equal** to the specified version.
- **equal** - Checks if the installed version of RoadRunner is **equal** to the specified version.

All three methods throw an `RoadRunner\VersionChecker\Exception\UnsupportedVersionException` if the installed version of RoadRunner does not meet the specified requirements. If RoadRunner is not installed, a `RoadRunner\VersionChecker\Exception\RoadrunnerNotInstalledException` is thrown.

```
use RoadRunner\VersionChecker\VersionChecker;
use RoadRunner\VersionChecker\Exception\UnsupportedVersionException;

$checker = new VersionChecker();

try {
    $checker->greaterThan('2023.1');
} catch (UnsupportedVersionException $exception) {
    var_dump($exception->getMessage()); // Installed RoadRunner version `2.12.3` not supported. Requires version `2023.1` or higher.
    var_dump($exception->getInstalledVersion()); // 2.12.3
    var_dump($exception->getRequestedVersion()); // 2023.1
}

try {
    $checker->lessThan('2.11');
} catch (UnsupportedVersionException $exception) {
    var_dump($exception->getMessage()); // Installed RoadRunner version `2.12.3` not supported. Requires version `2.11` or lower.
    var_dump($exception->getInstalledVersion()); // 2.12.3
    var_dump($exception->getRequestedVersion()); // 2.11
}

try {
    $checker->equal('2.11');
} catch (UnsupportedVersionException $exception) {
    var_dump($exception->getMessage()); // Installed RoadRunner version `2.12.3` not supported. Requires version `2.11`.
    var_dump($exception->getInstalledVersion()); // 2.12.3
    var_dump($exception->getRequestedVersion()); // 2.11
}
```

### Path to the RoadRunner binary

[](#path-to-the-roadrunner-binary)

To configure the `VersionChecker` to search for the RoadRunner binary in a location other than the default (application root with a rr filename), you can bind the `RoadRunner\VersionChecker\Version\InstalledInterface`within application container using the `RoadRunner\VersionChecker\Version\Installed` class and passing the desired file path as the **$executablePath** parameter. After that, you can retrieve the VersionChecker class from application container.

Example with Spiral Framework container:

```
use RoadRunner\VersionChecker\Version\InstalledInterface;
use RoadRunner\VersionChecker\Version\Installed;

$container->bindSingleton(InstalledInterface::class, new Installed(executablePath: 'some/path'));
$checker = $container->get(VersionChecker::class);
```

Testing
-------

[](#testing)

```
composer test
```

```
composer psalm
```

```
composer cs
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance75

Regular maintenance activity

Popularity47

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.8% 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 ~249 days

Total

5

Last Release

136d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/796136?v=4)[Anton Tsitou](/maintainers/wolfy-j)[@wolfy-j](https://github.com/wolfy-j)

---

Top Contributors

[![msmakouz](https://avatars.githubusercontent.com/u/67324318?v=4)](https://github.com/msmakouz "msmakouz (17 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![novikoff-vvs](https://avatars.githubusercontent.com/u/194783368?v=4)](https://github.com/novikoff-vvs "novikoff-vvs (1 commits)")[![rustatian](https://avatars.githubusercontent.com/u/8040338?v=4)](https://github.com/rustatian "rustatian (1 commits)")[![xepozz](https://avatars.githubusercontent.com/u/6815714?v=4)](https://github.com/xepozz "xepozz (1 commits)")

---

Tags

phproadrunnerroadrunnerroadrunner-phpversion-checker

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/roadrunner-php-version-checker/health.svg)

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k196.2M3.1k](/packages/composer-composer)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)

PHPackages © 2026

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