PHPackages                             typephp/typephp - 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. typephp/typephp

ActiveLibrary

typephp/typephp
===============

Transparent Runtime type checker for PHP. Enforces PHPDoc annotations including generics, typed arrays, array shapes, and advanced types at runtime in development and production.

v0.1.1(today)47↑2471.4%1MITPHPPHP ^8.1CI passing

Since Aug 8Pushed todayCompare

[ Source](https://github.com/typephp-php/typephp)[ Packagist](https://packagist.org/packages/typephp/typephp)[ GitHub Sponsors](https://github.com/rcalicdan)[ RSS](/packages/typephp-typephp/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

TypePHP
=======

[](#typephp)

 [![Build Status](https://github.com/typephp-php/typephp/actions/workflows/ci.yml/badge.svg)](https://github.com/typephp-php/typephp/actions) [![Latest Stable Version](https://camo.githubusercontent.com/544c4c8544946ef7e2ef82791cb1f6be076aa1742e18cb290fa45ee8d97f02a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f747970657068702f747970657068702e7376673f7374796c653d666c617426636f6c6f723d626c7565)](https://packagist.org/packages/typephp/typephp) [![Total Downloads](https://camo.githubusercontent.com/519e8e5d47055cb716b41db2237bccb61c8629df33dca553cb8e931f24d9b1d9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f747970657068702f747970657068702e7376673f7374796c653d666c617426636f6c6f723d677265656e)](https://packagist.org/packages/typephp/typephp) [![License](https://camo.githubusercontent.com/f7eb5296ff7e5a34d2116ecf72d4f790011a47cd9abd1b5d7c1fbcde15d63160/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f747970657068702f747970657068702e7376673f7374796c653d666c6174)](https://choosealicense.com/licenses/mit/) [![PHP Version](https://camo.githubusercontent.com/90c2ef947bd31290cc4a981db89aab1389fdc785309e35eea9e805dfa7c5ff9e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f747970657068702f747970657068702e7376673f7374796c653d666c6174)](https://packagist.org/packages/typephp/typephp) [![PHPStan Level MAX](https://camo.githubusercontent.com/e0d001e98c7e4091cead689dced7257fc56598784f1c1b27817e451ed46a17f8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d4c6576656c2532304d41582d627269676874677265656e2e7376673f7374796c653d666c6174)](https://phpstan.org/)

---

TypePHP is the first pure-PHP library that transparently enforces extended PHPDoc type contracts (generics, array shapes, scalar refinements, and callables) at runtime during execution, without introducing any new syntax or requiring C-extensions.

**[Read the full TypePHP documentation »](https://typephp-php.github.io/typephp/)**

**[Quick Start Guide »](https://typephp-php.github.io/typephp/getting-started/quick-start)**

Documentation
-------------

[](#documentation)

All the documentation lives on the [typephp-php.github.io/typephp website](https://typephp-php.github.io/typephp/):

- [Getting Started &amp; Installation Guide](https://typephp-php.github.io/typephp/getting-started/installation)
- [Quick Start Guide](https://typephp-php.github.io/typephp/getting-started/quick-start)
- [Architecture: How It Works](https://typephp-php.github.io/typephp/architecture/how-it-works)
- [Core Concepts: Function Contracts](https://typephp-php.github.io/typephp/core-concepts/function-contracts)
- [Core Concepts: Generics &amp; Bounds](https://typephp-php.github.io/typephp/core-concepts/generics-and-bounds)
- [Supported Types: Arrays &amp; Shapes](https://typephp-php.github.io/typephp/supported-types/arrays-and-shapes)
- [Troubleshooting &amp; FAQ](https://typephp-php.github.io/typephp/advanced/troubleshooting)

Inspiration
-----------

[](#inspiration)

TypePHP is conceptually inspired by Python's [Beartype](https://github.com/beartype/beartype), but bringing transparent runtime type enforcement for type annotations to the PHP ecosystem without any decorators or attributes.

Sponsors
--------

[](#sponsors)

Want to support the open-source development and maintenance of TypePHP? [Sponsor TypePHP me on GitHub »](https://github.com/sponsors/rcalicdan)

Contributing
------------

[](#contributing)

Any contributions are welcome. Feel free to open issues or submit pull requests on GitHub.

License
-------

[](#license)

TypePHP is open-source software licensed under the [MIT License](https://choosealicense.com/licenses/mit/).

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/163510169?v=4)[Reymart A. Calicdan](/maintainers/rcalicdan)[@rcalicdan](https://github.com/rcalicdan)

---

Top Contributors

[![rcalicdan](https://avatars.githubusercontent.com/u/163510169?v=4)](https://github.com/rcalicdan "rcalicdan (142 commits)")

---

Tags

phpdocPHPStandocblockpsalmgenericsstrict typestype-safetyruntime-typestype-checkertyped-arraysarray-shapesruntime-genericstypephp

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/typephp-typephp/health.svg)

```
[![Health](https://phpackages.com/badges/typephp-typephp/health.svg)](https://phpackages.com/packages/typephp-typephp)
```

###  Alternatives

[zircote/swagger-php

Generate interactive documentation for your RESTful API using PHP attributes (preferred) or PHPDoc annotations

5.3k148.6M661](/packages/zircote-swagger-php)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.2k12.6M131](/packages/dedoc-scramble)[dereuromark/cakephp-ide-helper

CakePHP IdeHelper Plugin to improve auto-completion

1892.4M48](/packages/dereuromark-cakephp-ide-helper)[phparkitect/phparkitect

Enforce architectural constraints in your PHP applications

9244.5M32](/packages/phparkitect-phparkitect)[deptrac/deptrac

Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers.

3.0k9.8M223](/packages/deptrac-deptrac)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)

PHPackages © 2026

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