9.4k
Stars
136
Forks
18
Open issues
30
Contributors
AI Analysis
ReflectionDocBlock is a PHP library that parses DocBlocks (documentation comments) according to the PHPDoc standard, enabling libraries to extract and interpret structured metadata embedded in code comments. It serves PHP developers and documentation tools who need to programmatically analyze DocBlock annotations; it is not a general-purpose parser but rather a specialized utility for the PHP ecosystem.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
PHP DocBlock parser powering phpDocumentor, PHPStan, and most PHP static analysis tooling
ReflectionDocBlock is a PHP library that parses PHPDoc-style DocBlock comments into structured objects, extracting summaries, descriptions, and typed tags (@param, @return, @var, etc.). It is the foundational parsing layer used by phpDocumentor, and is pulled in transitively by Symfony, PHPStan, Psalm, PHP-CS-Fixer, and dozens of other widely deployed PHP tools. Its primary audience is tool authors — static analyzers, documentation generators, annotation-driven frameworks — rather than end-user application developers. Despite modest star counts, Packagist download numbers are enormous, placing it firmly among the most-installed PHP packages globally.
Created in April 2012 as part of the phpDocumentor project to replace ad-hoc regex parsing of DocBlocks. Has matured over 13+ years through multiple major versions, closely tracking the evolving PHPDoc PSR draft standard.
Growth is not star-driven but dependency-driven. The package is a deep transitive dependency of PHPStan, Psalm, Symfony's PropertyInfo/Serializer, and Composer plugins, meaning its install count compounds with the entire PHP ecosystem's growth. New star activity is nearly flat (1/week), which is expected for infrastructure-layer libraries.
Packagist shows this package has hundreds of millions of cumulative installs, making it one of the most-downloaded PHP packages in existence. It is a declared dependency of PHPStan, Psalm, Symfony (multiple components), phpdoc-parser, and many Composer plugins. Real-world production usage is extensively verified at ecosystem scale.
Appears to follow a factory-based design with DocBlockFactory as the primary entry point, producing immutable DocBlock value objects. Tags appear to be individually typed (e.g., @param, @return have dedicated classes). Likely uses phpDocumentor/TypeResolver for type parsing and phpDocumentor/ReflectionCommon for shared interfaces, suggesting a modular split across companion packages.
Scrutinizer CI coverage badge is present in the README, suggesting tracked test coverage. Specific percentage not stated in README excerpt, but the presence of a CI integration workflow and Scrutinizer integration implies active test maintenance.
Last push was March 18, 2026 — approximately 3 months before the evaluation date. CI workflow is active. Given the library's stable, narrow scope, infrequent pushes are appropriate and do not indicate neglect. Project is actively maintained, not stagnant.
ADOPT IF: you are building a PHP tool that needs to parse or reflect on PHPDoc comments in a structured, standards-compliant way — documentation generators, static analyzers, annotation processors, or serialization frameworks. AVOID IF: you need cutting-edge union/intersection type parsing beyond the PHPDoc standard as implemented here; in that case phpstan/phpdoc-parser may be a better fit. MONITOR IF: PHP 8+ attribute adoption in your target codebase is accelerating and your use case could migrate away from DocBlock-based metadata entirely.
Independent dimensions
Mainstream potential
3/10
Technical importance
7/10
Adoption evidence
9/10
- PHP 8 native attributes may progressively reduce the need for DocBlock-based metadata parsing in frameworks and DI containers, shrinking one segment of its use cases over time.
- phpstan/phpdoc-parser is gaining traction as an alternative for advanced type-system use cases and could fragment the ecosystem if static analysis tools consolidate around it.
- The library's value is tightly coupled to the PHPDoc standard, which remains a draft PSR. Any significant community divergence from that standard could require substantial rework.
- Dependency on companion packages (TypeResolver, ReflectionCommon) means coordinated versioning is required; major version bumps across the suite can create upgrade friction for downstream consumers.
- Very low fork count (136) relative to star count suggests limited external contribution surface, meaning the project is largely dependent on the phpDocumentor team's continued engagement.
Likely to remain a stable, high-install infrastructure package for the PHP ecosystem for many years, with slow organic growth tied to PHP tooling adoption rather than any surge in direct usage. Gradual relevance shift as PHP attributes mature is possible but not imminent.
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- PHP
- License
- MIT
- Last updated
- 4mo ago
- Created
- 174mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
Top contributors
Recent releases
Similar repos
phpDocumentor/phpDocumentor
phpDocumentor is a specialized documentation generator for PHP projects that...
phpDocumentor/ReflectionCommon
ReflectionCommon is a PHP library providing shared reflection interfaces and...
phpDocumentor/TypeResolver
TypeResolver is a PHP library that implements PSR-5 specification for resolving...
phpstan/phpdoc-parser
PHPDoc Parser is a specialized PHP library that parses PHPDoc comments into an...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
9.4k | — | PHP | 8/10 | 4mo ago |
|
|
4.3k | — | PHP | 7/10 | 4d ago |
|
|
9.1k | — | PHP | 8/10 | 8mo ago |
|
|
9.2k | — | PHP | 8/10 | 3mo ago |
|
|
1.5k | — | PHP | 8/10 | 2d ago |
|
|
1.2k | — | PHP | 8/10 | 12h ago |
Doctrine Annotations solved a similar problem (structured metadata in DocBlocks) but relied on a full annotation syntax. PHP 8 attributes have largely deprecated that approach. ReflectionDocBlock focuses on standards-compliant PHPDoc parsing and remains relevant for type analysis tooling even as attribute adoption grows.
PHP-Parser operates at the AST level and can extract raw DocBlock strings, but does not parse their internal structure into typed tag objects. The two tools are complementary rather than competing; PHPStan and Psalm often use both.
PHPStan's own phpdoc-parser is a more recently built, performance-focused alternative that PHPStan itself uses internally. It has a stricter, richer type grammar. For tool authors prioritizing PHPStan-compatible type parsing, it is a credible alternative, though ReflectionDocBlock remains more widely integrated across the broader ecosystem.
Companion packages from the same organization. ReflectionDocBlock depends on them; they are not competitors but part of the same modular suite.
Many older PHP projects parse DocBlocks with ad-hoc regular expressions. ReflectionDocBlock offers a standards-conformant, structured alternative. The cost of switching is the library dependency itself, which is negligible given it is likely already transitively present.