Skip to content

Conversation

@MekDrop
Copy link
Member

@MekDrop MekDrop commented Jul 13, 2025

Resolves #27

Summary by CodeRabbit

  • Chores
    • Updated the minimum required PHP version to 8.3.
    • Adjusted automated testing workflows to use PHP 8.4 and a fixed version of the PHP setup action.

@coderabbitai
Copy link

coderabbitai bot commented Jul 13, 2025

Walkthrough

The pull request updates the minimum required PHP version to 8.3 in the composer.json file and modifies the GitHub Actions workflow to test only against PHP 8.4, using a fixed version of the PHP setup action. No other dependencies or configurations were changed.

Changes

File(s) Change Summary
.github/workflows/on_pull_request.yml Updated CI to test only PHP 8.4; fixed setup-php action version.
composer.json Changed PHP requirement from ">=7.1" to ">=8.3".

Assessment against linked issues

Objective (Issue #) Addressed Explanation
Bump PHP to min 8.3 (#27)

Possibly related issues

Poem

A hop and a skip, to PHP eight-point-three,
The code now runs where the carrots are free!
Composer’s demands have leapt up high,
And CI’s testing just one blue sky.
With every version, a fresh new patch,
This bunny’s code is hard to match!
🐇✨


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9a06654 and 8f76f0a.

📒 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-php fails 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 literal 8.4; otherwise use 8.4snapshot or nightly:

php:
  - 8.3
  - 8.4snapshot   # or nightly

Running the workflow once in a fork will confirm this quickly.


25-25: Good call on pinning setup-php to a fixed tag

Locking to shivammathur/setup-php@2.34.1 guarantees reproducibility and guards against unexpected breaking changes in the action’s master branch.

Comment on lines 5 to 9
"require": {
"imponeer/log-data-output-decorator": "^1.0",
"php": ">=7.1",
"php": ">=8.3",
"imponeer/extension-info-contracts": "^0.1.0 || ^0.3"
},
Copy link

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."
fi

Length 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.yml

Length 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.yml

Length 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.

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

@MekDrop MekDrop merged commit 6a2f89a into imponeer:main Jul 13, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Bump PHP to min 8.3

1 participant