Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Type Resolver Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enables building robust documentation generators (e.g., API docs, IDE integrations) by handling PSR-5-compliant type parsing for union types, generics, nullable annotations, FQSENs, and now non-decimal-int-string literals without reinventing core logic
  • Accelerates roadmap delivery for static analysis tools by providing reliable resolution of complex types (e.g., array<int, string>, enum-string, properties-of, non-decimal-int-string) that would require months of custom development
  • Validates "buy vs build" decision: 100% test coverage, 9k+ GitHub stars, and adoption by the phpDocumentor ecosystem reduce technical debt vs. in-house solutions; critical for products targeting enterprise PHP codebases with modern type syntax
  • Signals a healthy release cadence: v2.1.0 is a backward-compatible minor adding a new PSR-5 scalar literal type plus a packaging hygiene fix, reinforcing that the v2 generics baseline can be adopted without re-platforming risk. Confirms the roadmap assumption that new PHPDoc type keywords will land as drop-in minors rather than breaking major versions
  • De-risks targeting niche/enterprise codebases: non-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 fork

When to Consider This Package

Adopt 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.

How to Pitch It (Stakeholders)

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."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource