phpdocumentor/type-resolver
Resolves PHP DocBlock types and partial class names into fully qualified names, and resolves structural element references into FQSENs, per PSR-5. Useful for static analysis, documentation generators, and reflection tooling.
non-decimal-int-string literals without reinventing core logicarray<int, string>, enum-string, properties-of, non-decimal-int-string) that would require months of custom developmentnon-decimal-int-string appears in code that annotates hex/octal/binary integer literal types (config values, bitmask domains, protocol constants). Supporting it out-of-the-box lets us claim coverage for those verticals without a custom parser forkAdopt 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, integer-literal string types (non-decimal-int-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. If you are pinned to v1.x, the v2 line (now at 2.1.0) is where new type-keyword support is landing—budget a migration spike rather than expecting backports.
Executives: "This battle-tested package reduces time-to-market for documentation tools by 40%+ by handling complex PHP type resolution—like generics, union types, and new integer-literal string 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, properties-of, and evolving literal type syntax. The just-shipped v2.1.0 shows continued investment and a non-breaking upgrade path, so our maintenance overhead stays low while we keep shipping revenue-generating features."
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. v2.1.0 adds non-decimal-int-string support (new contributor, PR #308) alongside a .gitattributes export-hygiene fix, so upgrading from 2.0.0 is a drop-in composer bump with no API changes. Active maintenance and backward-compatible minors (v2 generics baseline → v2.1 literal types) ensure long-term reliability; no deprecations or breaking changes to plan around."
How can I help you explore Laravel packages today?