-
Notifications
You must be signed in to change notification settings - Fork 0
TypeSource interface #517
Copy link
Copy link
Closed
Labels
MxNDifferent behavior/resolution for the same thing in different contextsDifferent behavior/resolution for the same thing in different contexts
Description
Activity
Metadata
Metadata
Assignees
Labels
MxNDifferent behavior/resolution for the same thing in different contextsDifferent behavior/resolution for the same thing in different contexts
Define
Domain\TypeSource\TypeSource— the source-blind interface for resolving typed positions on symbols. Consumers hold this; no consumer sees whether an answer came from a native AST, a docblock, or reflection.Interface takes symbol identity + which typed position:
forFunctionReturn(FunctionName $fn): ?TypeforMethodReturn(ClassName $class, MethodName $method): ?TypeforParameter(ClassName|FunctionName $owner, ?MethodName $method, string $parameter): ?TypeforProperty(ClassName $class, PropertyName $property): ?TypeforConstant(ClassName $class, ConstantName $constant): ?TypeAdditional
for*methods may follow for AST-only positions (catch clauses, variable type-following). Not scope here.No implementations, no wiring.
Done:
src/Domain/TypeSource/TypeSource.phpcommitted; method set covers every typed-declaration position current callers need (see sweep report onsweep/deprecated-factories).Issue body drafted by AI; reviewed by human.