roadrunner-php/version-checker
Lightweight RoadRunner + PHP version compatibility checker. Detects your installed PHP version and validates it against the RoadRunner runtime requirements, helping prevent mismatched upgrades and deployment issues in CI/CD or local environments.
roadrunner-php/version-checker package is a lightweight utility for verifying RoadRunner (RR) server versions. It aligns well with infrastructure monitoring, CI/CD pipelines, or pre-deployment checks in Laravel/PHP applications using RoadRunner as a process manager.RR_VERSION >= "2.0.0"). Integration would require:
roadrunner-php/version-checker).bootstrap/app.php hook or a custom Artisan command).| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| RoadRunner API Changes | Medium | Pin exact RR version in composer.json or add fallback logic. |
| False Positives/Negatives | Low | Test against multiple RR versions in CI. |
| Dependency Bloat | Low | Package is tiny; negligible impact. |
| Lack of Laravel Integration | Low | Wrap in a Laravel-specific facade or command. |
deploy.php script)?rr get-version CLI) already handling this?php artisan rr:check-version command.VersionChecker facade for global access.RRVersionMiddleware).composer require roadrunner-php/version-checker.bootstrap/app.php:
use RoadRunnerPHP\VersionChecker\VersionChecker;
if (!VersionChecker::check('>=2.0.0')) {
throw new \RuntimeException('RoadRunner version not supported');
}
rr CLI available).roadrunner-php/version-checker after RoadRunner.bootstrap/app.php) or early in the request lifecycle (middleware).composer.json to avoid surprises:
"roadrunner-php/version-checker": "^1.0.0",
"spiral/roadrunner": "^2.0.0"
which rr or rr --version.VersionChecker::getVersion().php artisan rr:check-version.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| RR version too old | Deployment blocked | Upgrade RR or adjust version constraints. |
| RR API endpoint changes | Package breaks | Fallback to CLI check: shell_exec('rr --version'). |
| Network/socket issues | False negatives | Retry logic or CLI fallback. |
| Permission denied | Checks fail silently | Ensure PHP process has RR access. |
| CI/CD pipeline fails | Blocked deployments | Test in |
How can I help you explore Laravel packages today?