-
-
Notifications
You must be signed in to change notification settings - Fork 213
PHP 8.5 support #1221
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
base: master
Are you sure you want to change the base?
PHP 8.5 support #1221
Conversation
WalkthroughAdds a new GitHub Actions job Changes
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub Actions
participant Shared as contributte/.github/.../nette-tester-mysql.yml
note over GH,Shared `#D6F5D6`: New test85 job invokes shared workflow with PHP 8.5
GH->>Shared: dispatch (php: "8.5", database: "tests")
alt tests pass
Shared-->>GH: success
else tests fail
Shared-->>GH: failure
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
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 |
0a16220 to
3d0792e
Compare
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/tests.yml(1 hunks)composer.json(1 hunks)
🔇 Additional comments (1)
.github/workflows/tests.yml (1)
14-19: Verify external workflow supports PHP 8.5 nightly builds.PHP 8.5 is available on GitHub Actions as a nightly/development version via the shivammathur/setup-php action. The code itself (lines 14-19) is correct and consistent with existing test jobs (test84, test83, etc.).
However, the actual PHP 8.5 support depends on the external shared workflow
contributte/.github/.github/workflows/nette-tester-mysql.yml@master. Since this workflow is in an external repository, verify that it:
- Uses a recent version of shivammathur/setup-php that supports PHP 8.5 nightly
- Properly handles the
php: "8.5"input parameterThe workflow is proven to work with PHP 8.4, suggesting compatibility, but explicit verification of PHP 8.5 nightly support is recommended before merging.
| "extra": { | ||
| "branch-alias": { | ||
| "dev-master": "7.1.x-dev" | ||
| "dev-master": "7.2.x-dev" |
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.
🧩 Analysis chain
Verify nette/tester compatibility with PHP 8.5.
The branch alias bump from 7.1.x-dev to 7.2.x-dev is appropriate for adding PHP 8.5 support. However, confirm that nette/tester@^2.3.4 (line 43) officially supports PHP 8.5 to ensure the CI workflow will succeed.
🌐 Web query:
Does nette/tester 2.3.4 support PHP 8.5?
💡 Result:
No. Tester 2.3.x (including 2.3.4) is documented as compatible with PHP 7.1–8.0, so it does not support PHP 8.5. [1][2]
Sources:
- Nette Tester docs — Supported PHP versions (shows Tester 2.3 → PHP 7.1–8.0). [1]
- nette/tester on Packagist (current 2.5.x supports PHP 8.0–8.5). [2]
Update nette/tester constraint to support PHP 8.5.
The branch alias bump to 7.2.x-dev indicates PHP 8.5 support, but nette/tester 2.3.4 only supports PHP 7.1–8.0. The constraint "nette/tester@^2.3.4" (line 43) will not automatically upgrade to 2.5.x (which supports PHP 8.5), causing CI to fail on PHP 8.5. Update the constraint to "nette/tester@^2.5" or higher to resolve this incompatibility.
🤖 Prompt for AI Agents
In composer.json around line 78 (and update the dependency at line ~43 where the
constraint exists), the pinned constraint "nette/tester@^2.3.4" does not allow
the 2.5+ releases required for PHP 8.5; update the package constraint to
"nette/tester@^2.5" (or a newer compatible range) in the require/dev section and
then run composer update to refresh the lockfile so CI on PHP 8.5 can resolve to
a compatible version.
|
Failing as LeanMapper has PHP 7.4-8.4 |
3d0792e to
7c55aeb
Compare
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: 2
♻️ Duplicate comments (2)
.github/workflows/phpstan.yml (1)
18-18: Dependency compatibility concern: LeanMapper does not support PHP 8.5.This workflow will fail to install dependencies on PHP 8.5 due to LeanMapper incompatibility (referenced in the PR comments and LeanMapper issue #171).
.github/workflows/coverage.yml (1)
18-18: Critical blocker: PHP 8.5 test execution is not possible with current dependencies.The coverage workflow will fail during test execution because LeanMapper—a transitive dependency of the project—does not support PHP 8.5 (per LeanMapper issue #171 cited in the PR comments). This blocks the PR from merging.
To proceed:
- Coordinate with the LeanMapper maintainers for PHP 8.5 support, or
- Replace or upgrade LeanMapper if a compatible version or alternative exists, or
- Defer PHP 8.5 support until the dependency is compatible.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/workflows/codesniffer.yml(1 hunks).github/workflows/coverage.yml(1 hunks).github/workflows/phpstan.yml(1 hunks).github/workflows/tests.yml(1 hunks)README.md(1 hunks)composer.json(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- composer.json
- .github/workflows/tests.yml
| uses: contributte/.github/.github/workflows/codesniffer.yml@master | ||
| with: | ||
| php: "8.4" | ||
| php: "8.5" |
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.
🧩 Analysis chain
Dependency compatibility concern: LeanMapper does not support PHP 8.5.
According to the PR comments, LeanMapper—a project dependency—does not yet support PHP 8.5 (see LeanMapper issue #171). Updating the workflow to use PHP 8.5 will fail during dependency installation if composer cannot resolve the dependency tree.
Verify that either:
- LeanMapper has been updated to support PHP 8.5, or
- The project's dependency constraints have been relaxed or updated to accommodate PHP 8.5 compatibility.
I'll verify this dependency compatibility concern by checking the project's composer configuration and the current status of LeanMapper's PHP 8.5 support.
🏁 Script executed:
#!/bin/bash
# Find and display composer.json to check LeanMapper version constraints
fd -n "composer.json" --type f --exec cat {}Length of output: 230
🌐 Web query:
LeanMapper PHP 8.5 support current status 2025
💡 Result:
Short answer: As of Nov 23, 2025 LeanMapper does not yet declare PHP 8.5 support — current releases require PHP up to 8.4. [1][2] PHP 8.5 reached GA on Nov 20, 2025, so LeanMapper would need an update to add official 8.5 compatibility. [3]
Sources:
- tharos/leanmapper (Packagist) — package requires php: 7.4 - 8.4 (latest listed release). [1]
- LeanMapper changelog — v4.2.0 (2025-01-05) notes added support for PHP 8.4. [2]
- PHP 8.5 release announcement (PHP.net) — GA date Nov 20, 2025. [3]
Let me correct the shell script and examine the project's composer configuration and workflow context:
🏁 Script executed:
#!/bin/bash
# Find and display composer.json
fd "composer.json" --type f --exec cat {}
# Display workflow file around line 18
echo "---"
echo "Workflow file excerpt:"
fd "codesniffer.yml" --type f --exec cat {}Length of output: 1962
Let me retrieve the complete workflow file content:
🏁 Script executed:
#!/bin/bash
# Display the complete codesniffer workflow file
cat .github/workflows/codesniffer.ymlLength of output: 271
Revert workflow to PHP 8.4 or update LeanMapper constraint.
The critical issue is confirmed. LeanMapper does not yet declare PHP 8.5 support — current releases require PHP up to 8.4. The project's composer.json specifies "tharos/leanmapper": "^3.4.2 || ^4.0.0" in require-dev, which will fail to resolve when the workflow runs with PHP 8.5 because no matching LeanMapper version supports PHP 8.5.
Update line 18 in .github/workflows/codesniffer.yml to use PHP 8.4 instead, or defer this change until LeanMapper releases PHP 8.5 support and the project updates its dependency constraint.
🤖 Prompt for AI Agents
.github/workflows/codesniffer.yml around line 18: the workflow currently sets
php: "8.5" which causes dependency resolution failures because tharos/leanmapper
in composer.json does not declare PHP 8.5 support; change the PHP version to
"8.4" on that line (or revert to previous value) so the CI uses PHP 8.4 until
LeanMapper publishes a PHP 8.5-compatible release and the project's dependency
constraints are updated.
| | dev | `^7.2.x` | `master` | `3.2+` | `>=8.2` | | ||
| | stable | `^7.1.0` | `master` | `3.2+` | `>=8.2` | |
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.
🧩 Analysis chain
PHP version requirement in README does not reflect PHP 8.5 support status.
The Versions table shows PHP requirement as >=8.2 for both the dev (7.2.x) and stable (7.1.0) rows. However, since the PR is attempting to add PHP 8.5 support via the workflows, either:
- Update the PHP requirement to
>=8.5if 8.5 is now a minimum supported version, or - If PHP 8.5 support is conditional (pending LeanMapper compatibility), document this explicitly in the README rather than updating workflows prematurely.
Currently, the README and workflows are misaligned, which could mislead users about actual PHP 8.5 support availability.
🏁 Script executed:
#!/bin/bash
# Check README.md content around lines 50-51 to verify PHP version requirement
echo "=== README.md lines 40-60 ==="
sed -n '40,60p' README.mdLength of output: 756
🏁 Script executed:
#!/bin/bash
# Find and examine workflow files for PHP 8.5 references
echo "=== Searching for workflow files ==="
fd -e yml -e yaml --path '*workflow*' --path '*.github*'
echo ""
echo "=== Searching for PHP 8.5 references in workflows ==="
rg -n 'php.*8\.5|8\.5.*php' -g '*.yml' -g '*.yaml'Length of output: 325
🏁 Script executed:
#!/bin/bash
# Check if there are any recent changes to workflows or PHP version configs
echo "=== Checking for PHP version configuration files ==="
fd -e json -e yml -e yaml -e toml | grep -E '(php|composer)' | head -20Length of output: 66
🏁 Script executed:
#!/bin/bash
# Find workflow files correctly
echo "=== Workflow files in .github/workflows ==="
fd -type f -name '*.yml' -o -name '*.yaml' .github/workflows 2>/dev/null
echo ""
echo "=== Content of workflow files ==="
find .github/workflows -type f \( -name '*.yml' -o -name '*.yaml' \) -exec echo "File: {}" \; -exec cat {} \;Length of output: 3506
🏁 Script executed:
#!/bin/bash
# Check composer.json for PHP version requirements
echo "=== composer.json content ==="
cat composer.jsonLength of output: 1965
🏁 Script executed:
#!/bin/bash
# Broad search for any reference to 8.5 in the repository
echo "=== All references to '8.5' in repository ==="
rg '8\.5' -nLength of output: 266
Update README to document PHP 8.5 support status in workflows.
Your review comment is correct: the workflows now test PHP 8.5 (in codesniffer.yml, coverage.yml, phpstan.yml, and tests.yml with the test85 job), but the README's Versions table shows only >=8.2 without acknowledging this. Since composer.json still requires >=8.2 (not escalated to >=8.5), PHP 8.5 appears to be a tested/supported version rather than a new minimum. The README should either:
- Add a note documenting that PHP 8.5 is tested and supported, or
- Update the table to clarify tested PHP versions alongside minimum requirements
Currently, users relying on the README won't know that PHP 8.5 compatibility is being actively maintained.
🤖 Prompt for AI Agents
In README.md around lines 50-51 the Versions table lists PHP requirement as
">=8.2" but does not indicate that GitHub workflows actively test PHP 8.5;
update the README to document PHP 8.5 as a supported/tested runtime by either
adding a short note under the table stating "PHP 8.5 is also tested in CI (see
workflows)", or modify the table cells for dev and stable to read ">=8.2 (tested
on 8.5)" or add a new "Tested" column listing 8.5 — choose one approach and
ensure the phrasing makes clear that composer.json minimum remains >=8.2 while
CI additionally verifies 8.5 compatibility.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.