Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #898 +/- ##
=========================================
Coverage 99.71% 99.71%
- Complexity 1970 2007 +37
=========================================
Files 147 149 +2
Lines 4488 4545 +57
=========================================
+ Hits 4475 4532 +57
Misses 13 13 ☔ View full report in Codecov by Harness. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Firehed
marked this pull request as ready for review
November 3, 2026 00:38
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.
Closes #291.
Problem
Typing a method name in a class-like body offered nothing:
Change
Where a method's name is being written, completion now offers the magic methods the declaration may still be, inserting each with the signature the PHP manual gives it (
__toString(): string).What is offered follows PHP's rules:
__call,__callStatic, and__invoke.__callStaticand__set_stateare static; every other magic method is not. A declaration writtenstaticis offered only those two, and one withoutstaticonly the rest.__construct,__destruct, and__clonemust be public. A declaration writtenprivateorprotectedis offered only those three. No visibility written means public.How it gets there, each piece from an existing route:
PositionLocatorgives a method's written name its own slot,Slot::MethodName, split out ofSlot::DeclaredName; hover and definition answer it as before (nothing).ExpectedAtPositionturns that slot into a newExpected::$declaredMethod(aMethodName), from the written name andScope::getSelfName().MagicMethodCandidateslooks the class-like up throughSymbolSourceInterface: its kind, the declaring method's modifiers, and its other methods all come from theClassInfothe parsed declaration already produces. Name comparison usesMemberKind::Method->normalize.MagicMethodholds the list, the rules above, and each signature.$nameas a variable.Known limits
public function |). There, the parsed document cannot yet tell a method being declared from other unfinished members.public function __g|() {}), the full signature is still inserted.__construct()and__invoke()insert no parameters: the manual'smixed ...$values = ""is not valid to declare, and what they take is the author's choice.#37 (offering unimplemented abstract and interface methods) can use the same
Expected::$declaredMethod.🤖 Generated with Claude Code