Fix PHP version requirement to match plugin header#59
Conversation
The plugin header specifies PHP 8.0 as the minimum version, but composer.json and the fallback in functions-bootstrap.php were requiring PHP 8.3. Updated both to align with the plugin's actual requirement of PHP 8.0.
|
Caution Review failedThe pull request is closed. Walkthroughcomposer.json: the PHP Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@composer.json`:
- Around line 83-86: The composer.json currently sets config.platform.php to
"8.3.0" which causes Composer to resolve dependencies for PHP 8.3 even though
the package declares a minimum PHP of ">=8.0" in the require section; change
config.platform.php to "8.0.0" (or remove the platform override) so dependency
resolution matches the declared minimum PHP version, and re-run composer update
to regenerate composer.lock; look for the "config.platform.php" entry and the
"require" php version declaration to make the update.
| "config": { | ||
| "platform": { | ||
| "php": "8.3.0" | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, find and read composer.json to verify the claims
find . -name "composer.json" -type f | head -5Repository: a8cteam51/query-loop-load-more
Length of output: 89
🏁 Script executed:
# Read the full composer.json file
cat composer.json | head -100Repository: a8cteam51/query-loop-load-more
Length of output: 2595
🏁 Script executed:
# Check specific lines around line 30 (require) and lines 83-86 (config.platform)
sed -n '25,35p' composer.json
echo "---"
sed -n '80,90p' composer.jsonRepository: a8cteam51/query-loop-load-more
Length of output: 559
🏁 Script executed:
# Check if composer.lock exists and search for PHP 8.3 constraints
if [ -f "composer.lock" ]; then
echo "=== Checking composer.lock for PHP 8.3+ constraints ==="
rg '"php"\s*:\s*"[>=]*8\.3' composer.lock | head -20
echo ""
echo "=== Checking for any strict 8.3+ constraints ==="
rg '"php"\s*:\s*"[>=]*8\.[3-9]' composer.lock | head -20
fiRepository: a8cteam51/query-loop-load-more
Length of output: 289
Platform PHP 8.3 contradicts declared 8.0 minimum requirement.
The config.platform.php is set to 8.3.0, but the declared minimum is >=8.0. This causes Composer to resolve dependencies for PHP 8.3, pulling packages that require >=8.3 (confirmed in composer.lock). These packages will fail on PHP 8.0, contradicting the declared minimum. Update the platform to match the minimum requirement.
Suggested fix
"config": {
"platform": {
- "php": "8.3.0"
+ "php": "8.0.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.
| "config": { | |
| "platform": { | |
| "php": "8.3.0" | |
| }, | |
| "config": { | |
| "platform": { | |
| "php": "8.0.0" | |
| }, |
🤖 Prompt for AI Agents
In `@composer.json` around lines 83 - 86, The composer.json currently sets
config.platform.php to "8.3.0" which causes Composer to resolve dependencies for
PHP 8.3 even though the package declares a minimum PHP of ">=8.0" in the require
section; change config.platform.php to "8.0.0" (or remove the platform override)
so dependency resolution matches the declared minimum PHP version, and re-run
composer update to regenerate composer.lock; look for the "config.platform.php"
entry and the "require" php version declaration to make the update.
composer.jsonfrom>=8.3to>=8.0functions-bootstrap.phpfrom8.3to8.0These changes align with the plugin header which already specifies
Requires PHP: 8.0. The codebase is compatible with PHP 8.0 as it only uses features available in that version.Summary by CodeRabbit
Chores
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.