Repository navigation
feat: support RoadRunner v3 #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6d36ae1
feat: support RoadRunner v3
roxblnfk 216ca97
style(php-cs-fixer): fix coding standards
d3f7dc1
Merge remote-tracking branch 'origin/2.x' into HEAD
roxblnfk 8ecd9df
test: align tests with the RoadRunner v3 version handling
roxblnfk 7b08af5
Merge remote-tracking branch 'origin/2.x' into HEAD
roxblnfk 71a84a0
feat: rename the package to roadrunner/cli
roxblnfk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * This file is part of RoadRunner package. | ||
| * | ||
| * For the full copyright and license information, please view the LICENSE | ||
| * file that was distributed with this source code. | ||
| */ | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Spiral\RoadRunner\Console\Environment; | ||
|
|
||
| use Composer\InstalledVersions; | ||
|
|
||
| final class RoadRunnerVersion | ||
| { | ||
| public const PACKAGE_NAME = 'spiral/roadrunner'; | ||
|
|
||
| /** | ||
| * Used when the spiral/roadrunner metapackage is not installed. | ||
| */ | ||
| public const DEFAULT_CONSTRAINT = '3.*'; | ||
|
|
||
| /** | ||
| * Returns the RoadRunner binary version constraint matching the installed | ||
| * spiral/roadrunner metapackage, e.g. "3.*" or "2025.*". | ||
| * | ||
| * Not delegated to {@see \Spiral\RoadRunner\Version::constraint()}: without the metapackage | ||
| * it falls back to the roadrunner/worker version, whose major is unrelated to the binary's. | ||
| */ | ||
| public static function constraint(): string | ||
| { | ||
| if (!InstalledVersions::isInstalled(self::PACKAGE_NAME)) { | ||
| return self::DEFAULT_CONSTRAINT; | ||
| } | ||
|
|
||
| $version = \ltrim((string) InstalledVersions::getPrettyVersion(self::PACKAGE_NAME), 'v'); | ||
| [$major] = \explode('.', $version); | ||
|
|
||
| return \str_contains($version, '.') && \is_numeric($major) | ||
| ? $major . '.*' | ||
| : self::DEFAULT_CONSTRAINT; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ποΈ Data Integrity & Integration | π΄ Critical | β‘ Quick win
π Supported by static analysis
π Script executed:
Repository: roadrunner-php/cli
Length of output: 3512
π Web query:
packagist roadrunner/worker packageπ‘ Result:
π Web query:
packagist spiral/roadrunner-worker latest version 3.7π‘ Result:
π Script executed:
Repository: roadrunner-php/cli
Length of output: 809
Use the published worker package name.
roadrunner/worker:^3.8is not published on Packagist. This repository has no custom Composer repository and nocomposer.lock, so Composer cannot resolve the dependency. CI installation is therefore blocked.Use the published package and constraint from the PR objective:
Suggested fix
π Committable suggestion
π€ Prompt for AI Agents