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
SymbolInfoInterface carries structured documentation. The raw docblock string field is removed.
Blocked by #541 (docblock parser utility) and #538 (one symbol interface).
Unblocks #520 (DocblockTypeSource reads the parsed docblock off SymbolInfoInterface).
Motivation
Today ClassInfo, MethodInfo, PropertyInfo, ConstantInfo, and EnumCaseInfo each carry a ?string $docblock field. getDocumentation() returns text derived from it by DocblockParser::extractDescription. Any docblock-typing work would naturally reach for the same string, at which point "what does the docblock say for this symbol" has two consumers of the raw text, and the source-specific parsing rules leak into every caller.
If SymbolInfoInterface carries a structured Documentation populated once at construction time, the raw string never crosses the interface and consumers ask for the fact they want by name.
Shape
One accessor on SymbolInfoInterface: getDocumentation(): Documentation. No separate parsed-docblock accessor.
Each SymbolInfoInterface producer reads the docblock text in the way natural to its source and calls DocblockParser::parse(text, NameContext). A reflected symbol's NameContext carries its declaring namespace only, no import table; record that where the producer builds it.
The raw string field is removed from every implementation.
HasSymbolLocationTrait's DocblockParser::extractDescription call goes; ResolvedSymbolPresenter reads the structured value.
ExpressionResolver's @var element-type inference reads the parsed docblock through Documentation.
Rule edits this needs
The disallowedMethodCalls entry for DocblockParser::extractDescription is removed with the method. Any allowlist path or ledger row that named DocblockParser, HasSymbolLocationTrait, or ResolvedSymbolPresenter as a docblock-string reader is updated. The human makes these edits.
Done
No $docblock string field on any Domain\*Info class.
SymbolInfoInterfacecarries structured documentation. The rawdocblockstring field is removed.Blocked by #541 (docblock parser utility) and #538 (one symbol interface).
Unblocks #520 (
DocblockTypeSourcereads the parsed docblock offSymbolInfoInterface).Motivation
Today
ClassInfo,MethodInfo,PropertyInfo,ConstantInfo, andEnumCaseInfoeach carry a?string $docblockfield.getDocumentation()returns text derived from it byDocblockParser::extractDescription. Any docblock-typing work would naturally reach for the same string, at which point "what does the docblock say for this symbol" has two consumers of the raw text, and the source-specific parsing rules leak into every caller.If
SymbolInfoInterfacecarries a structuredDocumentationpopulated once at construction time, the raw string never crosses the interface and consumers ask for the fact they want by name.Shape
SymbolInfoInterface:getDocumentation(): Documentation. No separate parsed-docblock accessor.Documentationis one value type carrying the description, the deprecation flag and message, and the parsed docblock subtree from Adopt external docblock parser behind ParsedDocblock utility #541. Everyone reads from it.SymbolInfoInterfaceproducer reads the docblock text in the way natural to its source and callsDocblockParser::parse(text, NameContext). A reflected symbol'sNameContextcarries its declaring namespace only, no import table; record that where the producer builds it.HasSymbolLocationTrait'sDocblockParser::extractDescriptioncall goes;ResolvedSymbolPresenterreads the structured value.ExpressionResolver's@varelement-type inference reads the parsed docblock throughDocumentation.Rule edits this needs
The
disallowedMethodCallsentry forDocblockParser::extractDescriptionis removed with the method. Any allowlist path or ledger row that namedDocblockParser,HasSymbolLocationTrait, orResolvedSymbolPresenteras a docblock-string reader is updated. The human makes these edits.Done
$docblockstring field on anyDomain\*Infoclass.SymbolInfoInterface::getDocumentation()returnsDocumentation.Domain\Docblock\DocblockParser.composer testgreen.Issue body drafted by AI.