-
Notifications
You must be signed in to change notification settings - Fork 192
fix: php min version to 8.0.0 #1278
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
Conversation
WalkthroughThis pull request updates two PHP template files. The first change bumps the minimum PHP version requirement in the generated composer.json from >=7.1.0 to >=8.0.0. The second change modifies the test template to conditionally insert trailing commas only when not processing the last iteration of a property loop, and removes an unnecessary blank line in the generated code structure. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
templates/php/tests/Services/ServiceTest.php.twig (1)
45-45: Optional: Consider allowing trailing commas.The conditional comma insertion removes trailing commas from generated arrays. While syntactically correct, trailing commas (supported since PHP 5.4) are generally preferred in modern PHP codebases because they produce cleaner version control diffs when items are added or removed.
However, this is a stylistic choice and the current implementation is valid.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
templates/php/composer.json.twigtemplates/php/tests/Services/ServiceTest.php.twig
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
- GitHub Check: kotlin (server)
- GitHub Check: react-native (client)
- GitHub Check: dotnet (server)
- GitHub Check: web (client)
- GitHub Check: go (server)
- GitHub Check: apple (client)
- GitHub Check: android (client)
- GitHub Check: build (8.3, Python310)
- GitHub Check: build (8.3, WebNode)
- GitHub Check: build (8.3, Go112)
- GitHub Check: build (8.3, Ruby30)
- GitHub Check: build (8.3, WebChromium)
- GitHub Check: build (8.3, Python311)
- GitHub Check: build (8.3, KotlinJava11)
- GitHub Check: build (8.3, Python313)
- GitHub Check: build (8.3, FlutterStable)
- GitHub Check: build (8.3, Android14Java17)
- GitHub Check: build (8.3, Android5Java17)
| }, | ||
| "require": { | ||
| "php": ">=7.1.0", | ||
| "php": ">=8.0.0", |
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.
Critical: PHP version incompatibility with PHPUnit 10.
PHPUnit 10 requires PHP 8.1 or later, but this change sets the minimum PHP version to 8.0.0. This creates a dependency conflict where Composer can successfully install the package on PHP 8.0.0, but PHPUnit will fail to run.
🔎 Proposed fix
- "php": ">=8.0.0",
+ "php": ">=8.1.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.
| "php": ">=8.0.0", | |
| "php": ">=8.1.0", |
🤖 Prompt for AI Agents
In templates/php/composer.json.twig around line 19, the composer PHP requirement
is set to ">=8.0.0" which is incompatible with PHPUnit 10; change the constraint
to require PHP 8.1 or newer (e.g., "php": ">=8.1.0") in the template so
generated composer.json enforces a compatible PHP version, then
regenerate/validate composer.json and run composer install/validate and PHPUnit
to confirm no version conflicts.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.