PHPackages                             phpat/phpat - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. phpat/phpat

ActivePhpstan-extension[Testing &amp; Quality](/categories/testing)

phpat/phpat
===========

PHP Architecture Tester

0.12.4(2mo ago)1.2k3.5M—4.9%60[8 issues](https://github.com/carlosas/phpat/issues)[2 PRs](https://github.com/carlosas/phpat/pulls)20MITPHPPHP ^8.1CI passing

Since Sep 14Pushed 2mo ago21 watchersCompare

[ Source](https://github.com/carlosas/phpat)[ Packagist](https://packagist.org/packages/phpat/phpat)[ RSS](/packages/phpat-phpat/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (107)Used By (20)

[![PHP Architecture Tester](https://raw.githubusercontent.com/carlosas/phpat/main/.github/logo-small.png)](https://raw.githubusercontent.com/carlosas/phpat/main/.github/logo-small.png)

✔️ PHP Architecture Tester
==========================

[](#️-php-architecture-tester)

Easy to use architecture testing tool for PHP
---------------------------------------------

[](#easy-to-use-architecture-testing-tool-for-php)

 [![Version](https://camo.githubusercontent.com/b96e14eaaad261fb98983e568cb39e4e0da6a74f48f91009a66ba167066eb30b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70687061742f70687061743f6c6162656c3d6c61737425323076657273696f6e267374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/b96e14eaaad261fb98983e568cb39e4e0da6a74f48f91009a66ba167066eb30b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70687061742f70687061743f6c6162656c3d6c61737425323076657273696f6e267374796c653d666f722d7468652d6261646765) [![PHP Version](https://camo.githubusercontent.com/eb5cd1d1c5005470cf67e6de58a869f10aaf4b4e886a98f75104612228073f80/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f70687061742f70687061743f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/eb5cd1d1c5005470cf67e6de58a869f10aaf4b4e886a98f75104612228073f80/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f70687061742f70687061743f7374796c653d666f722d7468652d6261646765) [![PHPStan Version](https://camo.githubusercontent.com/3a61abebbf66c4209d931d922d0758f1daafb48cc7d8131309748a4d19fff8a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068707374616e2d253545322e312d626c75653f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/3a61abebbf66c4209d931d922d0758f1daafb48cc7d8131309748a4d19fff8a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068707374616e2d253545322e312d626c75653f7374796c653d666f722d7468652d6261646765)

### Introduction 📜

[](#introduction-)

**PHP Architecture Tester** is a PHPStan extension (Static Analysis tool) designed to verify architectural requirements.

It provides a natural language abstraction that enables you to define your own architectural rules and and assess their compliance in your code.

 [![Example](https://raw.githubusercontent.com/carlosas/phpat/main/docs/assets/example.gif)](https://raw.githubusercontent.com/carlosas/phpat/main/docs/assets/example.gif)

### Getting started 🚀

[](#getting-started-)

Require **PHPat** with [Composer](https://getcomposer.org/):

```
composer require --dev phpat/phpat
```

Activate the extension using one of the following methods:

 Automatic activation```
composer require --dev phpstan/extension-installer
```

 Manual activation```
# phpstan.neon
includes:
    - vendor/phpat/phpat/extension.neon
```

For further information, check out the documentation at **[phpat.dev](https://www.phpat.dev/getting-started/)**

You can visit the [Examples](docs/examples.md) section to get some ideas of typical use cases.

**PHP Architecture Tester** is open source, contributions are welcome!

> **Warning**
> The launch of early-stage releases (0.x.x) could break the API according to [Semantic Versioning 2.0](https://semver.org/). We are using *minor* for breaking changes until the release of the stable `1.0.0` version.

### Sponsors 💙

[](#sponsors-)

[![Claude](https://raw.githubusercontent.com/carlosas/phpat/main/docs/assets/claude.svg)](https://claude.com/contact-sales/claude-for-oss)

[![JetBrains](https://camo.githubusercontent.com/b5639e7738c6dfae9fe3f3e20175570b7376ce2577a772e09c25c2d4f14bf86e/68747470733a2f2f7265736f75726365732e6a6574627261696e732e636f6d2f73746f726167652f70726f64756374732f636f6d70616e792f6272616e642f6c6f676f732f6a6574627261696e732e737667)](https://jb.gg/OpenSourceSupport)

###  Health Score

71

—

ExcellentBetter than 100% of packages

Maintenance87

Actively maintained with recent releases

Popularity68

Solid adoption and visibility

Community44

Growing community involvement

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 94.2% 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 ~25 days

Recently: every ~12 days

Total

96

Last Release

62d ago

PHP version history (5 changes)0.1.0PHP ^7.1

0.5.0PHP ^7.2

0.8.0-alpha.1PHP ^7.3 || 8.0.\*

0.8.0-alpha.2PHP ^7.4 || ^8.0

0.12.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29227794?v=4)[Carlos A Sastre](/maintainers/carlosas)[@carlosas](https://github.com/carlosas)

---

Top Contributors

[![carlosas](https://avatars.githubusercontent.com/u/29227794?v=4)](https://github.com/carlosas "carlosas (915 commits)")[![p810](https://avatars.githubusercontent.com/u/3998736?v=4)](https://github.com/p810 "p810 (5 commits)")[![j6s](https://avatars.githubusercontent.com/u/3374170?v=4)](https://github.com/j6s "j6s (4 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (3 commits)")[![gertjuhh](https://avatars.githubusercontent.com/u/6802443?v=4)](https://github.com/gertjuhh "gertjuhh (3 commits)")[![AnnaDamm](https://avatars.githubusercontent.com/u/793921?v=4)](https://github.com/AnnaDamm "AnnaDamm (2 commits)")[![calebdw](https://avatars.githubusercontent.com/u/4176520?v=4)](https://github.com/calebdw "calebdw (2 commits)")[![irozgar](https://avatars.githubusercontent.com/u/1829877?v=4)](https://github.com/irozgar "irozgar (2 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (2 commits)")[![maciejkosiarski](https://avatars.githubusercontent.com/u/20283619?v=4)](https://github.com/maciejkosiarski "maciejkosiarski (2 commits)")[![ghostwriter](https://avatars.githubusercontent.com/u/9754361?v=4)](https://github.com/ghostwriter "ghostwriter (2 commits)")[![jakobw](https://avatars.githubusercontent.com/u/453024?v=4)](https://github.com/jakobw "jakobw (2 commits)")[![verfriemelt-dot-org](https://avatars.githubusercontent.com/u/1136869?v=4)](https://github.com/verfriemelt-dot-org "verfriemelt-dot-org (2 commits)")[![raffaelecarelle](https://avatars.githubusercontent.com/u/15015792?v=4)](https://github.com/raffaelecarelle "raffaelecarelle (2 commits)")[![priyadi](https://avatars.githubusercontent.com/u/1102197?v=4)](https://github.com/priyadi "priyadi (1 commits)")[![rgomezcasas](https://avatars.githubusercontent.com/u/1331435?v=4)](https://github.com/rgomezcasas "rgomezcasas (1 commits)")[![rvanlaak](https://avatars.githubusercontent.com/u/2707563?v=4)](https://github.com/rvanlaak "rvanlaak (1 commits)")[![SpencerMalone](https://avatars.githubusercontent.com/u/8786752?v=4)](https://github.com/SpencerMalone "SpencerMalone (1 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (1 commits)")[![stchr](https://avatars.githubusercontent.com/u/166079?v=4)](https://github.com/stchr "stchr (1 commits)")

---

Tags

architecturelinterphpphpstan-extensionstatic-analysistesting

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

78768.9M1.5k](/packages/phpstan-phpstan-symfony)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

66766.6M1.1k](/packages/phpstan-phpstan-doctrine)[spaze/phpstan-disallowed-calls

PHPStan rules to detect disallowed method &amp; function calls, constant, namespace, attribute, property &amp; superglobal usages, with powerful rules to re-allow a call or a usage in places where it should be allowed.

33320.0M375](/packages/spaze-phpstan-disallowed-calls)[mglaman/phpstan-drupal

Drupal extension and rules for PHPStan

20829.0M124](/packages/mglaman-phpstan-drupal)[ekino/phpstan-banned-code

Detected banned code using PHPStan

2925.6M92](/packages/ekino-phpstan-banned-code)

PHPackages © 2026

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