phpdocumentor/reflection-docblock
A DocBlock parser fully compatible with the PHPDoc standard. Use its DocBlockFactory to read summaries, descriptions, tags, and annotations from doc comments or reflection classes, so your library can extract embedded documentation and metadata.
@param, @return, @var, @method, @property, @mixin, @deprecated, and custom tags for tooling.InvalidTag) and serialization for caching parsed results.@param, @return, and @var via phpdocumentor/type-resolver.ReflectionAttribute instead.array<string, string>; PHPStan/Psalm have richer parsers.DocBlockFactory::createInstance()->create($docComment) to obtain summary, description, and tags; type resolution is handled through phpdocumentor/type-resolver. Malformed tags degrade into InvalidTag objects rather than breaking parsing, and parsed results are serializable for caching. Caveats: no generics notation support, and it parses PHPDoc metadata rather than runtime annotation objects—for new code, prefer PHP 8 attributes where possible. Integrate behind an internal interface so the parser can be swapped if requirements change.How can I help you explore Laravel packages today?