phpdocumentor/reflection-docblock
PHPDoc-compliant DocBlock parser from phpDocumentor. Parse summaries, descriptions and tags from doc comments or reflection objects using DocBlockFactory, enabling annotation-like metadata and easy access to structured DocBlock information.
@route, @auth, @deprecated) for runtime validation or dynamic behavior (e.g., auto-generating API docs, enforcing deprecation policies).@api endpoints must include @param for request bodies").@property tags, or API clients from @route annotations).@deprecated tags to trigger warnings or migrations in CI/CD pipelines.@param, @return) to reduce manual documentation.@feature-flag, @experimental) for feature-gating or experimental APIs.@payment methods must include @throws for InsufficientFundsException").@param, @return, @throws) and wants to programmatically access this metadata.@template, @mixin, or @implements).phpstan/phpdoc-parser under the hood for reliability).@Attribute in PHP 8+; consider phpdocumentor/reflection or rubix/ml for attribute parsing).theseer/tokenizer)."This is a ‘buy, not build’ opportunity to unlock hidden value in our codebase.
@route, @auth) to:
@property tags).@throws).@route for API docs) before full adoption.""This replaces fragile regex hacks with a battle-tested DocBlock parser.
@feature-flag) via StandardTagFactory.$factory = \phpDocumentor\Reflection\DocBlockFactory::createInstance();
$docblock = $factory->create($reflectionClass->getDocComment());
$routes = $docblock->getTagsByName('route'); // Extract @route annotations
@param) for validation.@api-version) via TagFactory.@throws).@Attribute (but migrate existing DocBlocks).How can I help you explore Laravel packages today?