# phpDocumentor/TypeResolver

A PSR-5 based resolver of Class names, Types and Structural Element Names

Repository: https://github.com/phpDocumentor/TypeResolver
Canonical: https://ross.abutalabs.com/products/typeresolver
Language: PHP
License: MIT
License Family: permissive
Topics: typeresolver
Last push: 2026-04-02T01:45:07+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 75, release rhythm 65, longevity 100
- inputs: {"age_days": 4102, "days_push": 154, "days_rel": 239, "gap_med": 4.0, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 9158, forks 51 (observed 2026-08-28T04:10:28.669356+00:00)

## What it is
A PHP library that resolves DocBlock type expressions and structural element names according to PSR-5, turning partial class names into fully qualified names. It provides TypeResolver and FqsenResolver classes that return value objects for types like primitives, compounds, arrays, and FQSENs.

## Use cases
- resolve docblock type annotations into type objects
- convert partial class names to fully qualified class names
- parse @var and @return type expressions in PHP docblocks
- resolve FQSENs for methods, properties, and constants
- build static analysis or documentation tools for PHP

## When to choose
- you are building a PHP documentation generator or static analyzer
- you need PSR-5 compliant type parsing in PHP
- you need to resolve partial class names against a class context

## When to avoid
- you need runtime type checking or validation of values
- you work outside the PHP ecosystem
- you need full static analysis rather than name/type resolution

## Facets
- artifact type: library
- maturity: stable
- function: parser, developer-tools
- domain: developer-tools, documentation, programming-languages
- platform: php
- tags: psr-5, docblock, fqsen, type-resolution, static-analysis

## Member repositories
- phpDocumentor/TypeResolver (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:28.669356+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:23:23.320849+00:00, confidence not recorded.
  - readme: https://github.com/phpDocumentor/TypeResolver (fetched 2026-08-28T04:10:28.669356+00:00, sha b7fc533a2969)
- Data as of 2026-08-30T08:39:29.467469+00:00.
