Skip to content

[EPIC] PHP 8.6 support — full reflection parity #219

Description

@lisachenko

Goal

Bring goaop/parser-reflection to full parity with PHP 8.6 (GA planned for 2026-11-19, currently in beta). This epic tracks all PHP 8.6 features that affect static reflection, following the same approach used for the 8.4/8.5 cycles (#162, #209).

Context

  • Master targets PHP 8.5+; CI already runs an experimental (allowed-to-fail) PHP 8.6 job in .github/workflows/phpunit.yml.
  • ReflectionEngine parses with PHP-Parser's newest supported grammar by default, so new 8.6 syntax support arrives via nikic/php-parser upgrades (currently ^5.4, latest is 5.8.0 which does not yet parse the 8.6 partial-application ? placeholder).
  • Runtime-parity tests against native reflection must be guarded with PHP_VERSION_ID >= 80600 where they exercise 8.6-only behavior, mirroring the existing per-feature stub pattern (tests/Stub/FileWith*85.phpFileWith*86.php).

PHP 8.6 features in scope (accepted/implemented RFCs)

Feature Reflection impact Sub-issue
Function parameter doc comments ReflectionParameter::getDocComment() must be emulated from AST TBD
ReflectionProperty::isReadable() / isWriteable() New methods to emulate statically (visibility, asymmetric visibility, readonly, hooks) TBD
Readonly property defaults getDefaultProperties() / ReflectionProperty::getDefaultValue() semantics change TBD
Partial Function Application (? / ... placeholders) Parsing must not break; blocked on upstream PHP-Parser support TBD
#[\Override] on class constants + __debugInfo() on enums + attribute API additions (ReflectionAttribute::getCurrent() — verify final status) Stub coverage + parity tests TBD
Internal functions gaining #[\Deprecated] (e.g. strcoll()) isDeprecated() parity for internal functions #215
8.6 deprecations (is_double()/is_integer()/is_long(), return from finally, etc.) + test scaffolding Library must run deprecation-clean on 8.6; shared 8.6 stub/guard infrastructure TBD

Out of scope (no reflection surface): clamp(), SortDirection enum, Time\Duration, polling API, pack/unpack endianness modifiers, session/security defaults, closure performance optimizations.

Delivery process

  • Each sub-issue is implemented on its own branch in an isolated worktree by a dedicated agent (max 4 in parallel) and lands as a separate PR referencing its sub-issue.
  • PRs are reviewed by the orchestrating session; final accept/merge stays with @lisachenko.
  • Definition of done per sub-issue: implementation + stubs + parity tests green on PHP 8.5 (and on the 8.6 experimental job where the runtime allows), PHPStan level 10 clean.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions