-
Couldn't load subscription status.
- Fork 0
Bump min PHP version to 8.3 #31
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
Resolves #27
WalkthroughThe pull request updates the minimum required PHP version to 8.3 in the Changes
Assessment against linked issues
Possibly related issues
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/on_pull_request.yml(1 hunks)composer.json(1 hunks)
🔇 Additional comments (2)
.github/workflows/on_pull_request.yml (2)
18-20: Verify CI image availability for PHP 8.4
shivammathur/setup-phpfails when a given minor version isn’t yet published on docker images (8.4 is still in pre-release as of July 2025).
Double-check that the action recognises the literal8.4; otherwise use8.4snapshotornightly:php: - 8.3 - 8.4snapshot # or nightlyRunning the workflow once in a fork will confirm this quickly.
25-25: Good call on pinningsetup-phpto a fixed tagLocking to
shivammathur/setup-php@2.34.1guarantees reproducibility and guards against unexpected breaking changes in the action’smasterbranch.
| "require": { | ||
| "imponeer/log-data-output-decorator": "^1.0", | ||
| "php": ">=7.1", | ||
| "php": ">=8.3", | ||
| "imponeer/extension-info-contracts": "^0.1.0 || ^0.3" | ||
| }, |
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.
💡 Verification agent
🧩 Analysis chain
Guard against unknown PHP 9.x with a stricter constraint
"php": ">=8.3" will also allow Composer to install the library on PHP 9.x+ as soon as it is released.
Unless you have already tested your codebase against the next major version, prefer an upper bound (or a caret range) to avoid accidental BC breaks pulled in by users:
- "php": ">=8.3",
+ "php": "^8.3", # equivalent to >=8.3 <9.0(or ">=8.3 <9.0" if you want the explicit form).
🏁 Script executed:
#!/bin/bash
set -e
echo "Locating composer.json..."
composer_file=$(find . -maxdepth 2 -type f -name composer.json | head -n1)
echo "Found: $composer_file"
echo -e "\nShowing PHP requirement in composer.json:"
grep -n '"php":' "$composer_file" || true
echo -e "\nChecking CI workflows for PHP 9.x support..."
if [ -d .github/workflows ]; then
grep -R -n "php" .github/workflows || echo "No PHP versions found in workflows."
else
echo ".github/workflows directory not found."
fiLength of output: 981
🏁 Script executed:
#!/bin/bash
set -e
echo "Extracting PHP versions from on_pull_request.yml..."
grep -R -n "matrix.php" -A3 .github/workflows/on_pull_request.ymlLength of output: 534
🏁 Script executed:
#!/bin/bash
set -e
echo "Extracting PHP versions from matrix in on_pull_request.yml..."
grep -R -n "matrix:" -A5 .github/workflows/on_pull_request.ymlLength of output: 313
Restrict PHP requirement to <9.0
To prevent accidental installs on untested PHP 9.x versions, please tighten the constraint in your composer.json:
• File: composer.json
"require": {
- "php": ">=8.3",
+ "php": "^8.3", # equivalent to >=8.3 <9.0
}You’ll still cover PHP 8.3 and 8.4 (as in your CI matrix) while guarding against unexpected breakage on PHP 9.x.
📝 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.
| "require": { | |
| "imponeer/log-data-output-decorator": "^1.0", | |
| "php": ">=7.1", | |
| "php": ">=8.3", | |
| "imponeer/extension-info-contracts": "^0.1.0 || ^0.3" | |
| }, | |
| "require": { | |
| "imponeer/log-data-output-decorator": "^1.0", | |
| - "php": ">=8.3", | |
| + "php": "^8.3", | |
| "imponeer/extension-info-contracts": "^0.1.0 || ^0.3" | |
| }, |
🤖 Prompt for AI Agents
In composer.json around lines 5 to 9, the PHP version requirement is set to
">=8.3" which allows installation on PHP 9.x versions that are untested. Update
the PHP version constraint to ">=8.3 <9.0" to restrict installations to PHP
versions 8.3 and 8.4 only, preventing accidental installs on PHP 9.x.
Resolves #27
Summary by CodeRabbit