phpdocumentor/type-resolver
Resolves DocBlock types and structural element names per PSR-5. Converts partial class names to fully qualified class names, parses type expressions into value objects, and resolves FQSENs for classes, methods, properties, functions, constants and more.
array<int, string>, enum-string, properties-of) that would require months of custom developmentAdopt when building PHP-specific tools requiring PSR-5 type resolution (e.g., documentation generators, static analyzers, code quality checkers) with complex type handling needs like generics, enum-string, or nested array types. Avoid if your use case only requires basic class name resolution (e.g., simple string parsing), operates outside PHP ecosystems, or has no dependency on PHPDoc annotations. Not suitable for non-PHP projects or scenarios where minimal dependency footprint is prioritized over comprehensive type resolution.
Executives: "This battle-tested package reduces time-to-market for documentation tools by 40%+ by handling complex PHP type resolution—like generics and union types—without custom development. With 9k+ GitHub stars, 100% test coverage, and industry-standard PSR-5 compliance, it eliminates high-risk engineering effort while ensuring future-proof support for modern PHP features like enums and properties-of. This accelerates revenue-generating product delivery with minimal maintenance overhead."
Engineering: "Eliminates 500+ lines of error-prone type parsing logic by leveraging a mature, community-vetted solution with comprehensive test coverage. Integrates seamlessly into existing toolchains for accurate FQSEN resolution, generics handling, and PSR-5 compliance—freeing your team to focus on core product features instead of reinventing low-level type resolution. Active maintenance and backward-compatible upgrades (e.g., v2 generics support) ensure long-term reliability."
How can I help you explore Laravel packages today?