PHPackages                             sj-i/phpdoc-type-reader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sj-i/phpdoc-type-reader

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sj-i/phpdoc-type-reader
=======================

A library for reading types from phpdoc

v1.0.0(2y ago)0369.4k—2%1[1 issues](https://github.com/sj-i/phpdoc-type-reader/issues)[11 PRs](https://github.com/sj-i/phpdoc-type-reader/pulls)2MITPHPPHP ^8.1

Since Mar 21Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/sj-i/phpdoc-type-reader)[ Packagist](https://packagist.org/packages/sj-i/phpdoc-type-reader)[ RSS](/packages/sj-i-phpdoc-type-reader/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (9)Dependencies (7)Versions (28)Used By (2)

phpdoc-type-reader
==================

[](#phpdoc-type-reader)

[![Minimum PHP version: 7.4.0](https://camo.githubusercontent.com/89e54687773afb25f5943cfbd66376d73e2ce50874c54429a78aac45cb6bcf84/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e342e302532422d626c75652e737667)](https://camo.githubusercontent.com/89e54687773afb25f5943cfbd66376d73e2ce50874c54429a78aac45cb6bcf84/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e342e302532422d626c75652e737667)[![Packagist](https://camo.githubusercontent.com/e7a17519fe8cce3486b3f5ea4a5db628bdf3ff7d4fa403b28fde5b85546f3727/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736a2d692f706870646f632d747970652d7265616465722e737667)](https://packagist.org/packages/sj-i/phpdoc-type-reader)[![Github Actions](https://github.com/sj-i/phpdoc-type-reader/workflows/build/badge.svg)](https://github.com/sj-i/phpdoc-type-reader/actions)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f9bbd13fafe22ff666606ba243472e23ec7df9ff9e2bb48b6b2b54723e2bc440/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736a2d692f706870646f632d747970652d7265616465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sj-i/phpdoc-type-reader/?branch=master)[![Coverage Status](https://camo.githubusercontent.com/e602a4dc51ad7232e6c0478a5593d27eb386deda20d3f5e03b96497e1790d7a9/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f736a2d692f706870646f632d747970652d7265616465722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/sj-i/phpdoc-type-reader?branch=master)[![Psalm coverage](https://camo.githubusercontent.com/8bc1830ffd949fd2b688f9ab2383ae7889e079ef64a5ec5c39e7609741a9ae51/68747470733a2f2f73686570686572642e6465762f6769746875622f736a2d692f706870646f632d747970652d7265616465722f636f7665726167652e7376673f)](https://camo.githubusercontent.com/8bc1830ffd949fd2b688f9ab2383ae7889e079ef64a5ec5c39e7609741a9ae51/68747470733a2f2f73686570686572642e6465762f6769746875622f736a2d692f706870646f632d747970652d7265616465722f636f7665726167652e7376673f)

A library for reading types from phpdoc.

Installation
------------

[](#installation)

```
composer require sj-i/phpdoc-type-reader
```

Requirements
------------

[](#requirements)

- PHP-8.1+

LICENSE
=======

[](#license)

- MIT

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance54

Moderate activity, may be stable

Popularity35

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 75.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~117 days

Recently: every ~223 days

Total

10

Last Release

833d ago

Major Versions

v0.1.2 → v1.0.02024-02-06

PHP version history (2 changes)v0.0.1PHP ^7.4|^8.0

v1.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6488121?v=4)[sji](/maintainers/sj-i)[@sj-i](https://github.com/sj-i)

---

Top Contributors

[![sj-i](https://avatars.githubusercontent.com/u/6488121?v=4)](https://github.com/sj-i "sj-i (52 commits)")[![renovate-bot](https://avatars.githubusercontent.com/u/25180681?v=4)](https://github.com/renovate-bot "renovate-bot (12 commits)")[![il-a-nakano](https://avatars.githubusercontent.com/u/21051037?v=4)](https://github.com/il-a-nakano "il-a-nakano (4 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (1 commits)")

---

Tags

phpphpdoctypegenerics

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/sj-i-phpdoc-type-reader/health.svg)

```
[![Health](https://phpackages.com/badges/sj-i-phpdoc-type-reader/health.svg)](https://phpackages.com/packages/sj-i-phpdoc-type-reader)
```

###  Alternatives

[phpoption/phpoption

Option Type for PHP

2.7k541.2M159](/packages/phpoption-phpoption)[symfony/type-info

Extracts PHP types information.

19951.9M114](/packages/symfony-type-info)[pinkary-project/type-guard

Type Guard module is part of the Pinkary Project, and allows you to \*\*narrow down the type\*\* of a variable to a more specific type.

198102.4k14](/packages/pinkary-project-type-guard)[zakirullin/mess

Convenient array-related routine &amp; better type casting

21228.9k2](/packages/zakirullin-mess)[strictus/strictus

Strict Typing for local variables in PHP

1606.9k](/packages/strictus-strictus)[garoevans/php-enum

Convenient way to always have an Enum object available and utilise Spl Types if available.

19158.8k5](/packages/garoevans-php-enum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
