feat: support PHP 8.3#93
Conversation
The library uses nothing newer than readonly classes (8.2) and the #[Override] attribute (8.3), so the ^8.4 platform requirement was stricter than necessary and limited adoption. - composer.json: php ^8.4 -> ^8.3 - phpstan.neon: phpVersion min 80400 -> 80300 (analysis passes with the 8.3 language/stdlib surface) - CI: add 8.3 to the test, phpstan and code-style matrices - README: update the requirements section phpunit 12.5 and php-cs-fixer 3.95 both support PHP 8.3. Claude-Session: https://claude.ai/code/session_017XTM7pxbWPVNLV639i5WgK
WalkthroughPHPの最小サポートバージョンを8.4から8.3へ引き下げる変更です。composer.json、phpstan.neon、.php-cs-fixer.dist.phpの設定を更新し、GitHub ActionsのCIワークフロー(code-style, phpstan, test)のPHPバージョンマトリクスに8.3を追加、Composerキャッシュキーをcomposer.jsonハッシュベースに変更、READMEのRequirements記載も更新しました。 ChangesPHP 8.3サポート拡張
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Code Review
This pull request lowers the minimum required PHP version from 8.4 to 8.3, updating the README, composer.json, and phpstan.neon configuration accordingly. There are no review comments, and I have no feedback to provide.
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.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #93 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 40 40
===========================================
Files 2 2
Lines 80 80
===========================================
Hits 80 80
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Code review of this PR found the 8.3 CI jobs red: - .php-cs-fixer.dist.php used PHP 8.4-only parenthesless-new method chaining (new PhpCsFixer\Config()->setRules(...)), a hard parse error on PHP 8.3. Wrap in parentheses. - Switch @PHP84Migration to @PHP83Migration so cs-fix can never rewrite code into 8.4-only forms while composer.json says ^8.3 (no reformatting results from the switch today). - Vendor cache keys hashed the gitignored composer.lock (always empty), so all matrix PHP versions shared one 'Linux-php-' cache. Key on the PHP version and composer.json hash instead. Claude-Session: https://claude.ai/code/session_017XTM7pxbWPVNLV639i5WgK
There was a problem hiding this comment.
Pull request overview
PHP の最小対応バージョンを 8.4 → 8.3 に緩和し、静的解析・CI・ドキュメントをそれに合わせて更新するPRです。ライブラリの利用可能範囲を広げつつ、CI で 8.3 の実行確認を担保する意図に沿った変更になっています。
Changes:
composer.jsonの PHP 要件を^8.3に変更- PHPStan の
phpVersion.minを80300に更新 - GitHub Actions の各ワークフローで PHP 8.3 をマトリクスに追加し、Composer vendor キャッシュキーを PHP バージョン別に分離
- README の Requirements を更新
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | 要求 PHP バージョン表記を 8.3+ に更新 |
| phpstan.neon | PHPStan の想定 PHP 最小バージョンを 8.3 に更新 |
| composer.json | require.php を ^8.3 に緩和 |
| .php-cs-fixer.dist.php | 移行ルールセットを @PHP83Migration に更新 |
| .github/workflows/test.yml | テストを PHP 8.3/8.4/8.5 で実行するように更新 |
| .github/workflows/phpstan.yml | PHPStan を PHP 8.3/8.4/8.5 で実行、キャッシュキーを PHP バージョン別に更新 |
| .github/workflows/code-style.yml | CS チェックを PHP 8.3/8.4/8.5 で実行、キャッシュキーを PHP バージョン別に更新 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -32,9 +32,9 @@ jobs: | |||
| uses: actions/cache@v3 | |||
| @@ -28,9 +28,9 @@ jobs: | |||
| uses: actions/cache@v3 | |||
概要
コードレビューで指摘した「
php: ^8.4は必要以上に厳しい」への対応です。このライブラリが使う最新の言語機能は readonly class(8.2)と
#[Override](8.3)で、8.4 固有の機能は使用していません。要求を^8.3に緩めることで採用可能なプロジェクトの裾野が広がります。変更内容
php: ^8.4→^8.3(dev 依存の phpunit 12.5 / php-cs-fixer 3.95 / phpstan は 8.3 対応済み)phpVersion.minを 80300 に検証
phpVersion: min 80300): エラーなし — 8.4 専用のシンボル・構文が使われていないことを解析レベルで確認https://claude.ai/code/session_017XTM7pxbWPVNLV639i5WgK
Summary by CodeRabbit