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.
Architecture fit: This package is ideal for PHP-based code analysis, documentation generation, or IDE tooling where PSR-5-compliant type resolution is required. Its standalone nature and focus on type/FQSEN parsing align perfectly with static analysis tools, API documentation generators, or code refactoring utilities. The Value Object model provides structured data for downstream processing without framework dependencies.
Integration feasibility: High feasibility due to Composer-based installation, clean API surface (single-class resolvers), and minimal external dependencies. The Context object requirement adds predictable complexity but is well-documented. Integration would involve wrapping the resolvers in domain-specific adapters for the target application's context.
Technical risk: Moderate. While test coverage is strong (100% for PseudoTypes, 96%+ overall) and maintenance is active, the "0 dependents" metric is misleading (phpDocumentor is its primary consumer). The v2 breaking changes require careful migration, and edge cases like complex generics or never-return types need validation in production scenarios. The 2026 release date appears to be a data error (actual latest release is 2.0.0 from 2023).
Key questions: How does it handle recursive type resolution in deeply nested generics? What's the memory/CPU overhead for scanning large codebases (e.g., 10k+ files)? Are there known issues with namespace alias resolution in multi-project environments? How does it handle non-standard docblock formats common in legacy code?
Stack fit: Perfect match for PHP 7.4+ environments. Works seamlessly with Symfony, Laravel, or custom frameworks since it's framework-agnostic. Ideal for tools like static analyzers (
How can I help you explore Laravel packages today?