You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[PHP8.6] Partial Function Application — parsing & reflection support (blocked on PHP-Parser) #224
PHP 8.6 introduces Partial Function Application (PFA): any call may use ? (single open argument) or ... (all remaining arguments) placeholders and evaluates to a Closure:
$makeSlug = str_replace('', '-', ?);
Status: blocked upstream
nikic/php-parser5.8.0 (latest as of 2026-08) does not yet parse the ? argument placeholder. First-class-callable syntax foo(...) is already supported (VariadicPlaceholder, covered by tests/Stub/FileWithFunctionsFcc.php), and the upstream AST design is intended to be forward-compatible with PFA.
Scope (once upstream support lands)
Bump nikic/php-parser constraint to the first release parsing PFA placeholders.
Add stub file(s) using PFA inside function/method bodies and closures; verify ReflectionFile / ReflectionFunction / ReflectionMethod handle bodies containing PFA without errors.
Verify Resolver/NodeExpressionResolver fails gracefully (not fatally) if a PFA expression appears in a context it cannot evaluate.
Confirm the default "newest supported grammar" in ReflectionEngine picks the syntax up automatically on a PHP 8.5 runtime.
Interim scope (actionable now)
Add a test documenting current behavior: source containing PFA placeholders raises a clear parse error (not silent corruption).
Activity
feat: full PHP 8.6 partial function application support via php-parse…
build: require rector ^2.6.7 so its preloaded php-parser bundle is >=…