Skip to content

feat: add PHP 8.5 support#79

Merged
valbeat merged 1 commit into
mainfrom
feat/php-8.5-support
Jun 10, 2026
Merged

feat: add PHP 8.5 support#79
valbeat merged 1 commit into
mainfrom
feat/php-8.5-support

Conversation

@valbeat

@valbeat valbeat commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

Add PHP 8.5 support to the CI pipeline while keeping PHP 8.4 supported (composer.json constraint ^8.4 already allows 8.5, so no change there).

Changes

  • CI workflows (test.yml, phpstan.yml, code-style.yml): add '8.5' to the PHP version matrix — each workflow now runs on both 8.4 and 8.5
  • test.yml: upload coverage and test results to Codecov only from the PHP 8.5 job to avoid duplicate uploads across matrix entries
  • phpstan.neon: widen phpVersion from 80400 to a min: 80400 / max: 80500 range so analysis covers both supported versions
  • README.md: document tested PHP versions (8.4 / 8.5)

Notes

  • No source code changes needed: src/ only uses features stable on 8.5 (readonly classes, #[Override], never types) with no deprecations
  • Dev dependencies (phpstan 2.2.2, phpunit 12.5.8, php-cs-fixer 3.95.4) all support PHP 8.5

Verification

  • Local (PHP 8.4.7): composer phpstan ✅ / composer cs-check ✅ / phpunit --no-coverage ✅ (69 tests, 111 assertions)
  • CI: expect 6 green jobs (8.4 × 3 + 8.5 × 3)

Summary by CodeRabbit

リリースノート

  • Chores
    • PHP 8.5 のサポートを追加しました
    • GitHub Actions ワークフローを拡張し、PHP 8.4 と 8.5 の両バージョンでテストと静的解析を実行するよう変更しました
    • プロジェクトドキュメントとツール設定を最新化しました

- Add PHP 8.5 to CI matrix in all three workflows (tests, phpstan, code style)
- Upload coverage and test results to Codecov only from the PHP 8.5 job to avoid duplicate uploads
- Widen phpstan phpVersion to a 8.4-8.5 range
- Document tested PHP versions in README
@valbeat valbeat self-assigned this Jun 10, 2026
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e6213abe-c037-41b4-83bc-cddc31162d88

📥 Commits

Reviewing files that changed from the base of the PR and between 2291d01 and 69bfa4a.

📒 Files selected for processing (5)
  • .github/workflows/code-style.yml
  • .github/workflows/phpstan.yml
  • .github/workflows/test.yml
  • README.md
  • phpstan.neon

Walkthrough

このプルリクエストは、php-result ライブラリの CI/CD パイプラインを PHP 8.5 に対応させる一連の変更です。ワークフロー行列拡張、カバレッジ条件付き実行、静的解析設定更新、ドキュメント整備により、PHP 8.4 と 8.5 の両バージョンでの動作保証を実装しています。

Changes

PHP 8.4/8.5 マルチバージョン対応

Layer / File(s) Summary
ワークフロー行列の拡張
.github/workflows/code-style.yml, .github/workflows/phpstan.yml
PHP CS Fixer と PHPStan のマトリクスに PHP 8.5 を追加し、両バージョンでの自動実行環境を確立。
テストワークフローとカバレッジレポート条件
.github/workflows/test.yml
テスト実行マトリクスを 8.4/8.5 に拡張。Codecov へのカバレッジアップロード(clover)とテスト結果アップロード(junit)を matrix.php == '8.5' 条件に限定し、重複送信を防止。
静的解析バージョン範囲設定
phpstan.neon
PHPStan の phpVersion を固定値 80400 から min/max 範囲指定(min: 80400, max: 80500)へ変更し、解析対象を PHP 8.4~8.5 に明示。
ドキュメント更新
README.md
Requirements セクションの PHP バージョン表記を「PHP 8.4 or higher (tested on PHP 8.4 and 8.5)」に更新し、テスト済みバージョン情報をユーザーに周知。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/php-8.5-support

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

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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the README to indicate testing on PHP 8.4 and 8.5, and attempts to configure a range of supported PHP versions in phpstan.neon. However, the reviewer correctly noted that PHPStan's phpVersion parameter does not support an array structure with min and max keys, which will lead to a configuration error. It is recommended to revert this setting to a single integer representing the minimum supported version.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread phpstan.neon
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2291d01) to head (69bfa4a).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##                main       #79   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity        40        40           
===========================================
  Files              2         2           
  Lines             80        80           
===========================================
  Hits              80        80           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@valbeat valbeat marked this pull request as ready for review June 10, 2026 08:43
Copilot AI review requested due to automatic review settings June 10, 2026 08:43
@valbeat valbeat merged commit 81c6834 into main Jun 10, 2026
9 checks passed
@valbeat valbeat deleted the feat/php-8.5-support branch June 10, 2026 08:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds CI-level support for running this library on PHP 8.5 alongside PHP 8.4, aligning static analysis and documentation with the expanded tested PHP versions.

Changes:

  • Expand GitHub Actions matrices to run tests, PHPStan, and code style checks on PHP 8.4 and 8.5.
  • Avoid duplicate Codecov uploads by uploading coverage/test results only from the PHP 8.5 matrix job.
  • Update PHPStan config and README to reflect/support the 8.4–8.5 tested range.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Documents tested PHP versions in the requirements section.
phpstan.neon Broadens PHPStan’s modeled PHP version range to cover 8.4–8.5.
.github/workflows/test.yml Adds PHP 8.5 to the test matrix and gates Codecov uploads to a single matrix entry.
.github/workflows/phpstan.yml Adds PHP 8.5 to the PHPStan workflow matrix.
.github/workflows/code-style.yml Adds PHP 8.5 to the code-style workflow matrix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
## Requirements

- PHP 8.4 or higher
- PHP 8.4 or higher (tested on PHP 8.4 and 8.5)
Comment thread phpstan.neon
Comment on lines +16 to +19
# Supported PHP versions (8.4 - 8.5)
phpVersion:
min: 80400
max: 80500 No newline at end of file
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.

2 participants