Language: parent:: and static:: resolution in extends chain (#1858) - #1883
Merged
Merged
Conversation
VM/JIT resolve parent::method() to the parent vtable with implicit $this for instance methods; static:: uses called-class LSB. Compiler rejects parent::class at compile time; VM rejects parent::class at runtime. Add compliance PHPTs and sync capability docs. Bump spine canonical count to 585 (BootstrapSelfhostBundleTest + roadmap footnotes). Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur
force-pushed
the
issue-1858-parent-static-resolution
branch
from
May 25, 2026 03:28
f5d0cad to
408c336
Compare
**589/593** did not satisfy check-wave3 hasSpine (**589**); use **589** / **593**. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
declaringClassLc()(class->value); resolveparent::method()to parent class with implicit$thisfor instance methods;static::uses called-class LSB; runtime rejectparent::class.parent::classwhen scope resolves to parent.parentscope viasetClassParentName/resolveJitStaticScopeClass; implicit$thisfor parent instance dispatch.parent::greet(), override + parent,static::make(); unit test forparent::classrejection.capabilities-syntax.md/capabilities.mdLSB note (Language: parent:: and static:: resolution in extends chain (#101 phase 1b) #1858). Spine canonical 585/588 sync (test + footnotes).Notes
echo parent::greet()inside void methods because nestedreturn <call>()from user functions still returns empty (separate VM bug).parent::$prop, traits (Language: Traits, abstract classes, and interfaces #144).Test plan
./script/docker-ci-local.sh fast(doc gates + MiniWebApp lint/VM CLI)ParentStaticScopeTest,parent_method_call,extends_method_override,static_late_binding_factory./script/docker-ci-local.sh(LLVM) before merge if required on maintainer hostCloses #1858
Made with Cursor