Skip to content

Fix PHP version requirement to match plugin header#59

Merged
nate-allen merged 5 commits into
trunkfrom
fix/php-version-requirement
Jan 28, 2026
Merged

Fix PHP version requirement to match plugin header#59
nate-allen merged 5 commits into
trunkfrom
fix/php-version-requirement

Conversation

@nate-allen
Copy link
Copy Markdown
Contributor

@nate-allen nate-allen commented Jan 28, 2026

  • Updated PHP version requirement in composer.json from >=8.3 to >=8.0
  • Updated fallback PHP version in functions-bootstrap.php from 8.3 to 8.0
  • Updated PHPUnit and dependencies to resolve security advisory (PKSA-z3gr-8qht-p93v)

These 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

    • Lowered the minimum PHP requirement from 8.3 to 8.0 to broaden compatibility.
    • Bumped plugin version to 1.0.18.
  • Documentation

    • Updated release notes/changelog and package metadata to reflect the PHP requirement change and new version.

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

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.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 28, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

composer.json: the PHP require constraint was changed from ">=8.3" to ">=8.0" and a config.platform entry was added with "php": "8.3.0". functions-bootstrap.php: the default minimum PHP version in wpcomsp_qllm_validate_requirements() was changed from "8.3" to "8.0". query-loop-load-more.php: plugin Version string updated from 1.0.17 to 1.0.18. readme.txt: stable tag and changelog updated to 1.0.18 documenting the PHP requirement change. No other logic or public API signatures were modified.

Possibly related PRs

🚥 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 'Fix PHP version requirement to match plugin header' directly summarizes the main changes: lowering PHP version requirements in composer.json and functions-bootstrap.php to align with the stated plugin header requirement of PHP 8.0.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

@nate-allen nate-allen merged commit 324c11d into trunk Jan 28, 2026
1 check passed
Copy link
Copy Markdown

@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`:
- 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.

Comment thread composer.json
Comment on lines 83 to +86
"config": {
"platform": {
"php": "8.3.0"
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, find and read composer.json to verify the claims
find . -name "composer.json" -type f | head -5

Repository: a8cteam51/query-loop-load-more

Length of output: 89


🏁 Script executed:

# Read the full composer.json file
cat composer.json | head -100

Repository: 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.json

Repository: 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
fi

Repository: 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.

Suggested change
"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.

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.

1 participant