Skip to content

build!: open 5.x on master (PHP 8.5+, merge-up from 4.x) - #841

Merged
lisachenko merged 6 commits into
masterfrom
feature/blissful-ptolemy-xb9qfz
Nov 8, 2026
Merged

lisachenko merged 6 commits into
masterfrom
feature/blissful-ptolemy-xb9qfz

Conversation

@lisachenko

Copy link
Copy Markdown
Member

What and why

master becomes the 5.x line; 4.x stays the maintenance branch and is cascaded into master.

Three commits, meant to be reviewed separately:

  1. ci: cascade-merge 4.x into master: new .github/workflows/merge-up.yml. On every push to 4.x it opens a chore: merge 4.x into master PR, or does nothing when the PR is already open or master already contains 4.x. It uses secrets.GH_PAT_TOKEN when that secret is set, because PRs opened with the default GITHUB_TOKEN do not start CI. CS, PHPStan and PHPUnit now also run on pushes to 4.x.
    Important: push-triggered workflows run from the pushed branch, so this commit also has to land on 4.x (cherry-pick ci: cascade-merge 4.x into master there). Until then the rule never fires.
  2. build!: require PHP 8.5, alias master as 5.x-dev: php: ^8.5.0 and dev-master aliased as 5.x-dev. The CI matrices drop 8.4, and jobs that ran on one version (coverage, demos, cs, copilot setup) now run on 8.5. README badge, CONTRIBUTING, AGENTS.md, the issue template and a new 5.0.0 (unreleased) CHANGELOG section are updated. The PHP_VERSION_ID < 80500 skip in SyntaxFixturesWeavingTest is removed in this commit because PHPStan reports it as always false under the new constraint, so this commit stays green.
  3. refactor!: drop the code paths for PHP versions before 8.5:
    • OPcache is always built in since PHP 8.5. FileCachePrimer no longer reports a missing extension and always passes opcache.file_cache_read_only=0. CacheFileWriter calls opcache_invalidate() without a function_exists check. The OPcache skips in PreloadTest and OpcacheWarmupCommandTest are removed.
    • The PHP 8.5 syntax stubs are now autoloaded through autoload-dev.files. Their #[RequiresPhp('>= 8.5.0')] gates and require_once calls are removed.
    • Comments and docs no longer describe pre-8.5 behaviour.
    • Kept on purpose: the method_exists($type, 'isSelf'/'isParent') probe in TypeGenerator. ReflectionNamedType on PHP 8.5 has no such methods, so the probe is not a pre-8.5 guard (the old comment said otherwise and is fixed). The RequiresPhp('>= 8.6.0-dev') gates are also kept.

Checklist

  • The title follows Conventional Commits (type(scope): summary)
  • Tests cover the change (existing suite; two data-provider cases that simulated PHP 8.4 / a missing OPcache were removed)
  • composer check passes: cs clean, phpstan level 10 no errors, phpunit 3519 tests OK. The run used PHP 8.5.12 with JIT disabled, because of the known 8.5.12 tracing-JIT crash listed in tests/AGENTS.md.
  • User-facing or breaking changes are in CHANGELOG.md

Generated by Claude Code

A push to the 4.x maintenance branch opens (or updates) a "merge 4.x into
master" pull request, so fixes made on 4.x are carried forward. CI also runs
on pushes to 4.x.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxhC1GE15owYbSGjsHAjCr
master becomes the 5.x line: the dev-master alias moves to 5.x-dev and the
minimum PHP version to 8.5 (CI matrices, docs and the issue template follow).
The PHP 8.5 syntax fixture guard in SyntaxFixturesWeavingTest is dropped here,
phpstan reports it as always false under the new constraint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxhC1GE15owYbSGjsHAjCr
- OPcache is always built in since PHP 8.5: FileCachePrimer no longer reports
  a missing extension and always passes opcache.file_cache_read_only=0,
  CacheFileWriter calls opcache_invalidate() directly, the opcache skips of
  PreloadTest and OpcacheWarmupCommandTest are gone
- PHP 8.5 syntax stubs are autoloaded like the other generator stubs, their
  tests lose the RequiresPhp('>= 8.5.0') gates and require_once calls
- comments and docs no longer describe pre-8.5 behaviour

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxhC1GE15owYbSGjsHAjCr
@codecov

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.63%. Comparing base (5d52481) to head (a72bea7).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #841      +/-   ##
============================================
+ Coverage     98.60%   98.63%   +0.03%     
+ Complexity     2291     2288       -3     
============================================
  Files           131      131              
  Lines          5947     5942       -5     
============================================
- Hits           5864     5861       -3     
+ Misses           83       81       -2     

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

Comment thread CHANGELOG.md Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxhC1GE15owYbSGjsHAjCr
Comment thread composer.json Resolved
The FCC and closure stubs are only read through parser-reflection, so they
need neither an autoload-dev files entry nor a require_once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxhC1GE15owYbSGjsHAjCr
Comment thread README.md Resolved
@lisachenko
lisachenko marked this pull request as ready for review November 8, 2026 12:29
@lisachenko
lisachenko merged commit 4ed1a85 into master Nov 8, 2026
12 checks passed
@lisachenko
lisachenko deleted the feature/blissful-ptolemy-xb9qfz branch November 8, 2026 12:29
@lisachenko lisachenko mentioned this pull request Nov 8, 2026
2 of 4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants