Skip to content

[TASK] allow and test PHP 8.6 - #23

Merged
Kanti merged 1 commit into
mainfrom
feature/php-8.6
Nov 26, 2026
Merged

Kanti merged 1 commit into
mainfrom
feature/php-8.6

Conversation

@Kanti

@Kanti Kanti commented Nov 26, 2026

Copy link
Copy Markdown
Member

Description and Background

Adds support for PHP 8.6, following the same pattern as the PHP 8.5 PR (#22):

  • composer.json: allow PHP ~8.6.0.
  • CI: add 8.6 to the test matrix.
  • CI image: use webdevops/php-dev:<php> directly instead of pluswerk/php-dev:nginx-<php>. pluswerk/php-dev has no PHP 8.6 image, and it only adds development tools that CI doesn't use on top of the webdevops images. webdevops/php-dev has composer, git and xdebug for 8.2–8.6.
  • rector.php: remove cacheClass(FileCacheStorage::class). Rector 2.8 removed that method, and since there is no lock file, CI always installs the latest rector. FileCacheStorage is rector's default anyway, so this changes nothing.

Motivation and Context

PHP 8.6.0 has been released. phpsu (phpsu/phpsu#203) can only be installed and tested on PHP 8.6 once there is a phpsu/shellcommandbuilder release that allows ~8.6.0.

Right now composer falls back to 2.0.0 on PHP 8.6, because that release still allows php >=7.2. 2.0.0 has implicitly nullable parameters (ShellBuilder::redirectDescriptor()), which PHP 8.6 reports as deprecated. 2.2.0 already declares them explicitly, so no code changes are needed here.

After merging, a release (e.g. 2.3.0) is needed for phpsu to pick it up.

How Has This Been Tested

  • Locally on PHP 8.3, using the same rector (2.8.5) and phpstan (2.3.7) as CI:
    • composer test: all 140 tests pass. assert() has to be enabled (zend.assertions=1), because two tests expect an AssertionError. That is already the case in the CI images.
    • grumphp: phpcs, phpstan, rector, fractor, the linters, composer_normalize and the composer audit all pass.
  • The same CI image switch was tested in [TASK] allow and test PHP 8.6 phpsu#203: with webdevops/php-dev, all jobs for PHP 8.2–8.5 are green there.
  • PHP 8.6 itself is only tested by this PR's CI, because there is no PHP 8.6 runtime available locally.

Checklist

  • My code follows the PSR coding guideline.
  • I have updated the documentation accordingly. (nothing to update, the README doesn't list PHP versions)
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes. (no code changes)
  • All new and existing tests passed. (PHP 8.6 is only checked by CI)

Generated by Claude Code

- allow PHP ~8.6.0 and add 8.6 to the CI matrix
- use webdevops/php-dev directly as CI image (pluswerk/php-dev has no
  PHP 8.6 image and only adds tools the CI does not need)
- rector.php: remove cacheClass(), it was removed in rector 2.8
  (CI installs the latest rector, FileCacheStorage is the default anyway)
@codecov

codecov Bot commented Nov 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.83%. Comparing base (d4da024) to head (d7bd890).

Additional details and impacted files
@@            Coverage Diff            @@
##               main      #23   +/-   ##
=========================================
  Coverage     99.83%   99.83%           
  Complexity      215      215           
=========================================
  Files            21       21           
  Lines           614      614           
=========================================
  Hits            613      613           
  Misses            1        1           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kanti
Kanti enabled auto-merge (squash) November 26, 2026 20:32
@Kanti
Kanti disabled auto-merge November 26, 2026 20:32
@Kanti
Kanti merged commit c6af26e into main Nov 26, 2026
12 checks passed
@Kanti
Kanti deleted the feature/php-8.6 branch November 26, 2026 20:32
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.

1 participant