Download the PHP package roadrunner-php/version-checker without Composer
On this page you can find all versions of the php package roadrunner-php/version-checker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download roadrunner-php/version-checker
More information about roadrunner-php/version-checker
Files in roadrunner-php/version-checker
Package version-checker
Short Description Checks that the installed RoadRunner binary matches the version required by the project's Composer packages
License MIT
Homepage https://roadrunner.dev/
Informations about the package version-checker
Check the installed RoadRunner version from PHP
The package finds out which RoadRunner version is installed and checks it against a version constraint, so an application or a library can fail early with a clear message instead of running against an incompatible server. RoadRunner 2.x, 2023.x–2025.x and 3.x are supported.
Get Started
Installation
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/roadrunnerpackage. - 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.
Versions are compared in RoadRunner release order: 2.x < 2023.x, 2024.x, 2025.x < 3.x.
For example, 3.0.0 satisfies greaterThan('2025.1'), and 2025.1.5 does not satisfy greaterThan('3.0').
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.
How the installed version is detected
When the RR_VERSION environment variable is set, its value is used as the installed version. Otherwise the
checker runs ./rr --version from the current working directory. The detected version is cached for the lifetime of
the process.
Path to the RoadRunner binary
To configure the VersionChecker to search for the RoadRunner binary in a location other than the default
(./rr), 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:
Without a container, pass the instance directly:
Testing
All versions of version-checker with dependencies
composer-runtime-api Version ^2.0
composer/semver Version ^3.3
symfony/process Version ^5.4 || ^6.0 || ^7.0 || ^8.0