Add PHP 8.5 to the test matrix and fix PHP 8.5 deprecations#232
Conversation
WalkthroughThe pull request updates the GitHub Actions test workflow to expand PHP version coverage. The Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/tests.yml (1)
42-44: 💤 Low valueConsider updating problem matcher to PHP 8.5.
The PHPUnit problem matcher is currently enabled only for PHP 8.3 (line 43). Now that PHP 8.5 is the latest version in the matrix, you may want to update this condition to
matrix.phpVersion == '8.5'for consistency.This is purely cosmetic—problem matchers provide GitHub UI annotations for test failures but don't affect test execution.
♻️ Proposed update
- name: Setup problem matchers for PHPUnit - if: matrix.phpVersion == '8.3' + if: matrix.phpVersion == '8.5' run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/tests.yml around lines 42 - 44, Update the PHPUnit problem matcher step's conditional to target PHP 8.5: locate the "Setup problem matchers for PHPUnit" job step and change the if condition from matrix.phpVersion == '8.3' to matrix.phpVersion == '8.5' so the echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" runs for the current PHP matrix version.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/tests.yml:
- Line 21: The CI matrix adds PHP 8.5 but composer.json pins phpunit/phpunit to
^9.5.8 which lacks official PHP 8.5 support; either remove '8.5' from the
phpVersion matrix in .github/workflows/tests.yml or update composer.json to a
PHPUnit release that supports PHP 8.5 (e.g., bump phpunit/phpunit to a
PHP‑8.5‑compatible major such as ^10.x and run composer update), and also adjust
the workflow's PHPUnit problem-matcher condition (the step that checks
matrix.phpVersion == '8.3') to include '8.5' or make it unconditional so test
annotations are consistent across the matrix.
---
Nitpick comments:
In @.github/workflows/tests.yml:
- Around line 42-44: Update the PHPUnit problem matcher step's conditional to
target PHP 8.5: locate the "Setup problem matchers for PHPUnit" job step and
change the if condition from matrix.phpVersion == '8.3' to matrix.phpVersion ==
'8.5' so the echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" runs
for the current PHP matrix version.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8a592deb-9148-4582-902e-3e341ccc0a2b
📒 Files selected for processing (1)
.github/workflows/tests.yml
Adds PHP 8.5 to the unit test matrix on both Ubuntu and Windows, and fixes the PHP 8.5 deprecations in Storm code that the new matrix entry surfaces:
src/Network/Http.php—curl_close()is deprecated since 8.5 (it has been a no-op since PHP 8.0, when curl handles becameCurlHandleobjects). Replaced withunset()to keep the early-release intent.src/Config/Repository.php—isset($this->afterLoad[$namespace])is hit with$namespace = nullfor every non-namespaced config key, and null array offsets are deprecated since 8.5. Added an explicit null check; behaviour is unchanged (the old null→""coercion could never match a registered callback, sinceafterLoading()is always called with a string namespace).src/Console/Traits/ProcessesQuery.php— implicitly nullableint $limit = nullparameter is deprecated; made it explicitly?int.After these fixes, a
php -lsweep ofsrc/on 8.5 reports no compile-time deprecations, and the full test suite emits none at runtime either.Verified locally on PHP 8.5.5 and 8.4.14 against current
develop(identical results on both):phpcsandphpstan analyseare clean on the changed files.Note: until orchestral/testbench-core#415 (submitted separately) is merged and tagged, one remaining deprecation notice from the vendored testbench skeleton (
PDO::MYSQL_ATTR_SSL_CA) will still appear in 8.5 test output. It is non-fatal and outside Storm's control.