Skip to content

feat: target PHP 8.6 - #278

Merged
lisachenko merged 8 commits into
masterfrom
claude/php-8.6-support-sjmwff
Aug 29, 2026
Merged

feat: target PHP 8.6#278
lisachenko merged 8 commits into
masterfrom
claude/php-8.6-support-sjmwff

Conversation

@lisachenko

Copy link
Copy Markdown
Owner

Master moves on to PHP 8.6 (currently 8.6.0beta2); PHP 8.5 support continues on the new 8.5 branch, snapshotted from master before this change.

Branch model

  • Cascade flow extended to 8.4 => 8.5 => master (8.6) in .github/branch-flow.json. The same map is on the 8.5 branch; chore: extend cascade flow to 8.4 => 8.5 => master #276 applies it to 8.4 (merge-up resolves the successor from the pushed branch's own copy).
  • composer.json: platform requirement ~8.6.0, dev-master branch alias → 8.6.x-dev.

Version bump

Boot guard [80600, 80700), PHP_MINOR: '8.6' in all four workflows, docker base images, generator defaults, README/AGENTS/CONTRIBUTING/issue-template docs.

Generated engine definitions

include/8.6/linux-x64-{nts,zts} generated natively from php-src tag php-8.6.0beta2 (NTS from a release build, ZTS from a release ZTS build compiled for this purpose), plus regenerated stubs/zend-engine-structs.php and .phpstorm.meta.php. darwin-* and windows-* artifacts land via the generation workflows once those runners have 8.6 builds, same staging as the 8.5 cycle.

Engine changes 8.6 required

  • zend_function_type / zend_class_type C23 enums: the ZEND_*_FUNCTION/ZEND_*_CLASS #defines became typed uint8_t enums (same values). The generator now extracts both enums (ClangAstIndex learned to prefer a defining enum declaration over the forward declaration C23_ENUM expands to), and ce->type reads dropped their ord() (FFI returns int, not a 1-char string).
  • zend_closure.this_ptr is a zend_object * (was a zval): ClosureEntry::setThis() and GetClosureHook bind through object refcounts.
  • Internal functions' arg_info is converted to zend_arg_info (interned zend_string names, NULL name on the return entry) at registration: getArgumentInfo() now reads one entry layout for user and internal functions.
  • AST kinds: AST_PLACEHOLDER_ARG added, AST_METHOD_REFERENCEAST_TRAIT_METHOD_REFERENCE, AST_PARENT_PROPERTY_HOOK_CALL removed, AST_PIPE/AST_CONST_ENUM_INIT renumbered. New opcodes 211–213 (TYPE_ASSERT, CALLABLE_CONVERT_PARTIAL, SEND_PLACEHOLDER).
  • zend_hash_index_add_or_update asserts HASH_ADD_NEW only combined with HASH_ADD; HashTable::addIndex() now passes HASH_ADD (which also makes its duplicate-key check meaningful).
  • Optimizer folds more calls: the 8.6 optimizer constant-folds (and devirtualizes) calls it can resolve at compile time, so the redefine-churn leak scenario calls swapped functions through runtime-opaque names; its leak-gate children now run with opcache off, exactly like the CI internal leg. The SHM copy-out caveat for pre-existing instances is unchanged 8.5 behaviour (docs/hot-swap.md).
  • PHPStan phpVersion stays at 80500 until PHPStan accepts 80600 (2.2.9 still caps at 8.5).

Validation (PHP 8.6.0beta2, linux-x64-nts debug build)

  • Default suite: 543 tests green; --group internal --process-isolation green; opcache-runner leg (opcache.enable_cli=1) green; --group opcache --fail-on-skipped green (70 tests).
  • PHPStan level max: no errors; php-cs-fixer clean.
  • Header drift: re-running the generator produces byte-identical artifacts.
  • Boot guard verified: rejects PHP 8.5 with the branch-mismatch message, boots on 8.6.

CI notes: macOS/Windows legs skip cleanly until their 8.6 artifacts are generated by the dedicated workflows; setup-php needs a 8.6 build on the runners for the linux legs (pre-release), and composer install under a pre-release 8.6 needs --ignore-platform-req=php until GA.


Generated by Claude Code

claude and others added 8 commits August 28, 2026 20:52
The 8.5 maintenance branch takes over PHP 8.5 support while master
moves on to PHP 8.6. Fixes affecting 8.4 now cascade through 8.5
before reaching master.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WvwX3zFemZVZENmF3fSrcE
Master moves on to PHP 8.6 (currently in beta); PHP 8.5 support
continues on the new 8.5 maintenance branch. Bumps the boot guard,
composer platform requirement and dev-master alias (8.6.x-dev),
PHPStan phpVersion, CI PHP_MINOR, docker base images, generator
defaults and docs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WvwX3zFemZVZENmF3fSrcE
Generated natively from PHP 8.6.0beta2 (php-src tag php-8.6.0beta2).
darwin-* and windows-* artifacts follow via the generation workflows
once 8.6 builds are available on those runners.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WvwX3zFemZVZENmF3fSrcE
…P 8.6

- NodeKind: AST_PLACEHOLDER_ARG added, AST_METHOD_REFERENCE renamed to
  AST_TRAIT_METHOD_REFERENCE, AST_PARENT_PROPERTY_HOOK_CALL removed,
  AST_PIPE and AST_CONST_ENUM_INIT renumbered
- OpCode: TYPE_ASSERT, CALLABLE_CONVERT_PARTIAL, SEND_PLACEHOLDER (211-213)
- zend_closure.this_ptr is a zend_object* since 8.6 (was a zval):
  ClosureEntry::setThis() and GetClosureHook now bind through object
  refcounts instead of zval copies
- generator: extract ZEND_INTERNAL_FUNCTION/ZEND_USER_FUNCTION/ZEND_EVAL_CODE
  from the new zend_function_type C23 enum; ClangAstIndex prefers a defining
  enum declaration over the forward declaration C23_ENUM expands to
- regenerate linux artifacts from release builds (constants now carry the
  function-type enum and ZEND_DEBUG=0)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WvwX3zFemZVZENmF3fSrcE
- extract zend_class_type (ZEND_INTERNAL_CLASS/ZEND_USER_CLASS) as an enum:
  ce->type is a uint8-typed enum since 8.6, no longer a char - drop the ord()
  reads in ReflectionClass and ClassSpecializer
- internal functions' arg_info is converted to zend_arg_info entries with
  interned zend_string names at registration since 8.6: getArgumentInfo()
  reads one shared entry layout for user and internal functions
- zend_hash_index_add_or_update: 8.6 asserts HASH_ADD_NEW only appears
  combined with HASH_ADD; HashTable::addIndex() now passes HASH_ADD, which
  also makes its duplicate-key check actually work
- redefine-churn scenario: call swapped functions through runtime-opaque
  names (the 8.6 optimizer constant-folds calls it can resolve at compile
  time) and spawn leak-gate children with opcache off like the CI internal
  leg - the SHM copy-out caveat for pre-existing instances is unchanged
  behaviour, see docs/hot-swap.md
- ReflectionMethod::invoke() deprecation for static methods in a test helper
- pin PHPStan phpVersion at 80500 until 2.x accepts 80600

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WvwX3zFemZVZENmF3fSrcE
- php-cs-fixer: allow running on PHP 8.6 while the fixer does not list it
  as supported yet (no 8.6-only syntax in the codebase)
- generator native mode: snapshot builds (X.Y.Z-dev, setup-php nightlies)
  have no php-src release tag - fall back to the PHP-X.Y branch and then
  master for the three sliced sources; drift against the running build is
  still caught by the probe/validate stage
- generator windows mode: skip cleanly when windows.php.net has no build
  or devel pack for a snapshot version - the CI presence guards keep the
  gap visible and the leg self-heals on the first tagged build
- generator docker mode + ci: while Docker publishes only the -rc image
  family for a pre-release minor, resolve php:X.Y-rc-cli/-zts as the base
  for the header-drift and debug-build legs; self-heals to the stable tags
  at GA

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WvwX3zFemZVZENmF3fSrcE
The generator now exits 0 with a SKIPPED notice when windows.php.net has
no build or devel pack for a snapshot PHP version; record that in a step
output so the smoke-check and artifact upload do not demand files no run
could have produced. Self-heals on the first tagged 8.6 build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WvwX3zFemZVZENmF3fSrcE
@lisachenko
lisachenko marked this pull request as ready for review August 29, 2026 06:25
@lisachenko
lisachenko merged commit 12da8d9 into master Aug 29, 2026
29 checks passed
@lisachenko
lisachenko deleted the claude/php-8.6-support-sjmwff branch August 29, 2026 06:26
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.

2 participants