build(php): Raise minimum version to 8.4#60
Conversation
Move the supported PHP floor from 8.3 to 8.4 across the toolchain. Drop 8.3 from the CI matrix (now 8.4 and 8.5), bump the Docker image, phpstan and rector targets, and align every version reference in the README, docs site, and contributor guides. Revert an experimental 8.5 pipe operator in nameFix back to the typed one-liner so the code runs on the 8.4 floor. Also tighten the removeAccents benchmark surfaced by static analysis: guard the str_repeat count as a non-negative int and fold each result into a printed checksum so the pure calls cannot be optimised away. Signed-off-by: Marjo Wenzel van Lier <marjo.vanlier@gmail.com>
|
Warning Ignoring CodeRabbit configuration file changes. For security, only the configuration from the base branch is applied for open source repositories. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (14)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR qualifies global PHP function calls in ChangesString replacement and benchmark correctness
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 10✅ Passed checks (10 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 32 32
===========================================
Files 1 1
Lines 61 61
===========================================
Hits 61 61 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request upgrades the library's minimum PHP version requirement from PHP 8.3 to PHP 8.4 across all configuration files, documentation, Dockerfile, Composer settings, PHPStan, and Rector configurations. Additionally, it optimizes global function calls in StringManipulation.php using fully-qualified names, and updates the benchmark test suite to prevent dead-code elimination of pure function calls by accumulating and printing a checksum. There are no review comments provided, so I have no feedback to evaluate.
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.
PR Summary by Qodobuild(php): Raise minimum PHP version to 8.4 Description
Diagram
High-Level Assessment
Files changed (16)
|
There was a problem hiding this comment.
Pull request overview
This PR raises the project-wide minimum supported PHP version from 8.3 to 8.4 and updates the toolchain (Composer, Docker, CI, static analysis, Rector) and documentation to consistently reflect that new floor, while keeping library code compatible with PHP 8.4.
Changes:
- Updated platform/tooling version references (Composer PHP requirement, Docker base image, CI matrices, PHPStan and Rector target versions).
- Adjusted the
RemoveAccentsComplexityBenchmarkto consume results (avoid unused-result warnings) and guardstr_repeat()against negative counts. - Refreshed documentation and contributor guidance to state PHP 8.4+.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Benchmark/RemoveAccentsComplexityBenchmark.php | Consumes benchmark results and guards repeat count to keep benchmark tooling robust. |
| src/StringManipulation.php | Minor tweak to the optimized single-char strtr() fast path condition. |
| rector.php | Updates Rector target version/sets to PHP 8.4. |
| README.md | Updates stated PHP requirement to 8.4+. |
| phpstan.neon | Updates PHPStan target version to 8.4. |
| docs/index.md | Updates docs site to reflect PHP 8.4+ requirement. |
| docs/getting-started.md | Updates getting-started requirements to PHP 8.4+. |
| docs/contributing.md | Updates contributing prerequisites to PHP 8.4+. |
| docs/_config.yml | Updates docs site description to PHP 8.4+. |
| Dockerfile | Bumps base image to php:8.4-cli-alpine. |
| CONTRIBUTING.md | Updates local PHP version note to 8.4+. |
| composer.json | Raises PHP requirement to ^8.4 and updates description text. |
| CLAUDE.md | Updates guidance and CI description to PHP 8.4+. |
| .github/workflows/php.yml | Drops PHP 8.3 from the CI matrix. |
| .github/workflows/codecov.yml | Runs Codecov job on PHP 8.4. |
| .coderabbit.yaml | Updates config text to PHP 8.4+ and minor wording punctuation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| // Optimize single character replacements using strtr which is faster for this case | ||
| if (is_string($search) && is_string($replace) && strlen($search) === 1) { | ||
| if (\is_string($search) && \is_string($replace) && \strlen($search) === 1) { |
Code Review by Qodo
1. Extension requirements mismatch
|
|
Changelog updates: 🔄 2026-06-27 *Changed
|
|
Code review by qodo was updated up to the latest commit 6615fd1 |
Code Review — PR #60: Raise minimum version to 8.4This PR is a clean, well-scoped version bump: it consistently updates PHP references across CI, Docker, Composer, static analysis, and docs. The benchmark changes add a dead-code-elimination guard and a defensive repeat-count clamp. All changes are internally consistent with the stated goal. Three actionable issues and two minor observations follow. Finding 1 — Phan config not updated (
|
| Severity | File | Issue |
|---|---|---|
| High | .phan/config.php:58,61 |
target_php_version and minimum_target_php_version not bumped to 8.4 |
| Medium | src/StringManipulation.php:232 |
strtr not backslash-qualified unlike adjacent \is_string/\strlen |
| Low | tests/Benchmark/…:102 |
max(0, …) guard is dead code — can never fire for valid LENGTHS |
| Nit | tests/Benchmark/…:62 |
Checksum only samples last iteration result |
| Nit | tests/Benchmark/…:51 |
Warmup assigns to $result that is immediately clobbered |
🤖 Generated with Claude Code
Summary
Raises the supported PHP floor from 8.3 to 8.4 across the whole toolchain and aligns every version reference. The library code stays 8.4-compatible (no 8.5-only syntax).
Changes
Platform / build
composer.json:require php ^8.4Dockerfile:php:8.4-cli-alpine["8.4", "8.5"](drops 8.3); codecov job on 8.4phpstan.neonphpVersion: 80400;rector.phpPHP_84/UP_TO_PHP_84Code
nameFix(): reverted an experimental 8.5 pipe-operator rewrite back to the typed one-liner. The pipe form forced untyped wrapper closures that broke static analysis and required PHP 8.5; the one-liner is shorter, fully typed, and runs on the 8.4 floor.Benchmark (
RemoveAccentsComplexityBenchmark)str_repeatcount as a non-negative int.removeAccents()result into a printed checksum so the pure calls cannot be optimised away (also resolvesstaticMethod.resultUnused).Docs
CLAUDE.md, and review config updated to 8.4+.Notes
8.3references are intentionally kept because changing them would make them false: thephpstan.neontyped-constant note (typed constants arrived in 8.3) and the historical benchmark-measurement record indocs/performance.md.Verification
src/): no errorsSummary by CodeRabbit
Bug Fixes
Tests