Skip to content

Conversation

@genhoi
Copy link
Contributor

@genhoi genhoi commented Jan 25, 2026

No duplicates 🥲.

I have searched for a similar issue.
What should be improved or cleaned up?
Need to consider support for google/protobuf v4

Q A
Bugfix?
Breaks BC?
New feature? ✔️
Issues #35

Summary by CodeRabbit

  • Chores
    • Updated google/protobuf dependency constraint to support both version 3.7+ and 4.0+, enabling broader compatibility with protobuf versions.

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

No duplicates 🥲.

I have searched for a similar issue.
What should be improved or cleaned up?
Need to consider support for google/protobuf v4
@coderabbitai
Copy link

coderabbitai bot commented Jan 25, 2026

📝 Walkthrough

Walkthrough

The google/protobuf dependency constraint in composer.json was updated from "^3.7" to "^3.7 || ^4.0", enabling support for both protobuf 3.x and 4.x versions while maintaining backward compatibility.

Changes

Cohort / File(s) Summary
Dependency Update
composer.json
Expanded google/protobuf version constraint from ^3.7 to ^3.7 || ^4.0 to support protobuf 4.x releases

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A protobuf dance, both old and new,
Version four joins the three that flew,
Compatibility blooms, | | between them shines,
Our code hops forward on all timelines! 🚀

🚥 Pre-merge checks | ✅ 3
✅ 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 'Adding support for google/protobuf v4.x' clearly and specifically describes the main change in the pull request, which is broadening the dependency constraint to enable protobuf 4.x compatibility.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

🤖 Fix all issues with AI agents
In `@composer.json`:
- Line 42: The composer.json protobuf version constraint is too permissive
("google/protobuf": "^3.7 || ^4.0") and can conflict with roadrunner-api-dto;
update the constraint to "google/protobuf": "^3.22 || ^4.0" to match the
roadrunner-api-dto requirement, ensuring dependency resolution consistency—edit
the composer.json entry for the google/protobuf package accordingly.

"spiral/roadrunner": "^2023.2 || ^2024.1 || ^2025.1",
"spiral/goridge": "^4.0",
"google/protobuf": "^3.7"
"google/protobuf": "^3.7 || ^4.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

🏁 Script executed:

# First, let's check the composer.json file to see the actual state
cd /tmp && find . -name "composer.json" -type f 2>/dev/null | head -1

Repository: roadrunner-php/services

Length of output: 49


🏁 Script executed:

# List files to understand repo structure
git ls-files | grep -E "composer\.(json|lock)" | head -5

Repository: roadrunner-php/services

Length of output: 80


🏁 Script executed:

# Read the composer.json file
cat composer.json

Repository: roadrunner-php/services

Length of output: 1978


🏁 Script executed:

# Check roadrunner-api-dto from Packagist
curl -s "https://packagist.org/packages/roadrunner-php/roadrunner-api-dto.json" | jq -r '.package | {latest_release: .releases | keys[0], versions: (.versions | keys | .[:5])}' 2>/dev/null || echo "Failed to fetch"

Repository: roadrunner-php/services

Length of output: 82


🏁 Script executed:

# Get more details on roadrunner-api-dto latest version
curl -s "https://packagist.org/packages/roadrunner-php/roadrunner-api-dto.json" | jq -r '.package.versions | to_entries | sort_by(.key) | reverse | .[0] | {version: .key, require: .value.require}' 2>/dev/null || echo "Failed"

Repository: roadrunner-php/services

Length of output: 170


Update protobuf constraint to match roadrunner-api-dto requirement.

The constraint should be "^3.22 || ^4.0" instead of "^3.7 || ^4.0". The roadrunner-api-dto dependency (v1.9.0 latest) requires google/protobuf: "^3.22 || ^4.0", which means protobuf versions 3.7–3.21 would satisfy your project's constraint but fail to satisfy the transitive dependency constraint. This creates a potential version resolution conflict.

Align the protobuf constraint with the transitive dependency requirement to prevent dependency resolution issues:

Suggested change
-        "google/protobuf": "^3.7 || ^4.0"
+        "google/protobuf": "^3.22 || ^4.0"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"google/protobuf": "^3.7 || ^4.0"
"google/protobuf": "^3.22 || ^4.0"
🤖 Prompt for AI Agents
In `@composer.json` at line 42, The composer.json protobuf version constraint is
too permissive ("google/protobuf": "^3.7 || ^4.0") and can conflict with
roadrunner-api-dto; update the constraint to "google/protobuf": "^3.22 || ^4.0"
to match the roadrunner-api-dto requirement, ensuring dependency resolution
consistency—edit the composer.json entry for the google/protobuf package
accordingly.

@butschster butschster requested a review from roxblnfk January 26, 2026 05:31
@butschster butschster self-assigned this Jan 26, 2026
@butschster butschster added the enhancement New feature or request label Jan 26, 2026
@butschster butschster merged commit 71e8e65 into roadrunner-php:2.x Jan 26, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants