Skip to content

Conversation

@Nyholm
Copy link
Contributor

@Nyholm Nyholm commented Dec 12, 2025

I verified the change logs, I could not find anything that could affect us.

Summary by CodeRabbit

  • Chores
    • Expanded Symfony compatibility to include 8.x for console, HTTP client, and YAML components.
  • Chores
    • Improved runtime handling of command registration to work across multiple Symfony versions, ensuring commands initialize correctly regardless of framework version.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 12, 2025

Walkthrough

Updated composer.json to add Symfony 8.0 to several package constraints and modified bin/rr to use addCommand(...) when available with a fallback to add(...), adjusting command registration for Symfony API differences.

Changes

Cohort / File(s) Change Summary
Composer: Symfony 8 support
composer.json
Added `
Runtime compatibility for command registration
bin/rr
Use Application::addCommand(...) when present, otherwise fall back to Application::add(...) to register commands, preserving previous initialization semantics across Symfony versions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review composer.json changes for intended version ranges and transitive dependency implications.
  • Inspect bin/rr compatibility branch for correct detection of addCommand availability, behavior parity, and potential edge cases when running on older Symfony versions.
  • Verify command registration tests or runtime smoke tests across targeted Symfony versions.

Poem

🐰 I hopped through composer and made it neat,
I nudged version eight in every suite.
In bin/rr I learned a small new trick,
addCommand when it's there — else add will stick.
A cheery hop for compatibility, quick! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Support Symfony 8.0' directly and clearly summarizes the main objective of the pull request, which is to add compatibility with Symfony 8.0 by updating dependency constraints and handling API differences.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a51ff87 and b5fc791.

📒 Files selected for processing (1)
  • composer.json (1 hunks)

Comment on lines +37 to +39
"symfony/console": "^5.3 || ^6.0 || ^7.0 || ^8.0",
"symfony/http-client": "^4.4.51 || ^5.4.49 || ^6.4.17 || ^7.2 || ^8.0",
"symfony/yaml": "^5.4.49 || ^6.4.17 || ^7.2 || ^8.0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Symfony 8.0 minimum PHP version requirement

💡 Result:

Symfony 8.0 requires PHP 8.4.0 or higher. [1][2]

Sources:
[1] Symfony 8.0 Release (symfony.com/releases/8.0).
[2] Symfony 8 overview (symfony.com/8).


🌐 Web query:

Symfony 8.0 PHP compatibility matrix supported versions

💡 Result:

Symfony 8.0 requires PHP 8.4.0 or higher — i.e. PHP >= 8.4 (any later PHP releases are supported so long as they meet that minimum). [1][2]

Sources:

  • Symfony Releases (8.0): Symfony 8.0 — Requires PHP 8.4.0 or higher. [1]
  • Symfony 8 product page / release notes — Requires PHP 8.4 or higher. [2]

Update PHP constraint to support Symfony 8.0 or remove Symfony 8.0 support.

Symfony 8.0 requires PHP 8.4 or higher, but this package declares "php": ">=8.1" (line 32). This creates a compatibility gap—users on PHP 8.1–8.3 can install the package with Symfony 8.0 but will encounter runtime failures.

To properly support Symfony 8.0, either update the PHP minimum version constraint to >=8.4:

-        "php": ">=8.1",
+        "php": ">=8.4",

Or remove the Symfony 8.0 constraint if you want to maintain support for PHP 8.1–8.3:

-        "symfony/console": "^5.3 || ^6.0 || ^7.0 || ^8.0",
-        "symfony/http-client": "^4.4.51 || ^5.4.49 || ^6.4.17 || ^7.2 || ^8.0",
-        "symfony/yaml": "^5.4.49 || ^6.4.17 || ^7.2 || ^8.0"
+        "symfony/console": "^5.3 || ^6.0 || ^7.0",
+        "symfony/http-client": "^4.4.51 || ^5.4.49 || ^6.4.17 || ^7.2",
+        "symfony/yaml": "^5.4.49 || ^6.4.17 || ^7.2"

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In composer.json around lines 32 and 37-39, the package allows PHP ">=8.1" but
lists Symfony 8.0 in the symfony/* constraints (lines 37-39), creating a
compatibility gap because Symfony 8.0 requires PHP >=8.4; fix by either updating
the PHP platform constraint to ">=8.4" (adjust line 32) to legitimately support
Symfony 8.0, or remove the "|| ^8.0" alternatives from the symfony/console,
symfony/http-client and symfony/yaml constraints (lines 37-39) to keep PHP >=8.1
support without claiming Symfony 8 compatibility.

@roxblnfk
Copy link
Member

roxblnfk commented Dec 12, 2025

Hi. Have you tested this package with Symfony 8?
There might be deprecations:

cli/bin/rr

Lines 71 to 74 in a51ff87

$app->add(new GetBinaryCommand());
$app->add(new VersionsCommand());
$app->add(new DownloadProtocBinaryCommand());
$app->add(new MakeConfigCommand());


BTW you might prefer using the DLoad package for loading binaries.

@Nyholm
Copy link
Contributor Author

Nyholm commented Dec 14, 2025

Oh, Im sorry. I missed that. I've updated the PR. (And tested it now)

BTW you might prefer using the DLoad package for loading binaries.

I hav enot see that repo, I see you created it a few years ago. I'll give it a try. Thank you.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
bin/rr (1)

71-82: The addCommand() approach is correct for Symfony 8.0.

The code properly handles the API transition: Application::add() was deprecated in Symfony 7.4 and removed in Symfony 8.0, replaced by Application::addCommand(). The method_exists() check correctly ensures compatibility across versions. The comment "For Symfony 7.3 and lower" is accurate.

Consider refactoring to eliminate code duplication.

Both branches instantiate the same four commands. You can simplify by extracting the method selection:

$commands = [
    new GetBinaryCommand(),
    new VersionsCommand(),
    new DownloadProtocBinaryCommand(),
    new MakeConfigCommand(),
];

$method = method_exists($app, 'addCommand') ? 'addCommand' : 'add';
foreach ($commands as $command) {
    $app->$method($command);
}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b5fc791 and 6a6975f.

📒 Files selected for processing (1)
  • bin/rr (1 hunks)

@roxblnfk roxblnfk merged commit 54909d3 into roadrunner-php:2.x Dec 14, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants