carlosas/phpat
✔️ PHP Architecture Tester - Easy architecture testing for PHP observed · 2026-08-28
Health v2 · maintenance only
90/100
- Activity 97
- Release rhythm 75
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 23
- age_days: 2550
- days_rel: 169
- days_push: 23
- n_releases_24m: 18
Adoption not part of the score
1275 stars · 61 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
PHP Architecture Tester (PHPat) is a PHPStan extension that verifies architectural requirements in PHP codebases, such as which namespaces or classes may depend on which. Rules are written in PHP with a fluent DSL of selectors and assertions, and are executed as part of a standard PHPStan analysis run.
Use cases
- enforce architecture rules in a php project
- prevent domain layer from depending on infrastructure in php
- verify php layer boundaries with phpstan
- check forbidden dependencies between php namespaces
- assert php classes are final, readonly, or enums
- guard ddd bounded context independence in php
- run architecture conformance tests in ci for php code
When to choose
- your project already uses PHPStan and you want architecture checks in the same analysis pipeline with baselines and caching
- you need to enforce layer boundaries like domain/application/infrastructure or hexagonal architecture rules
- you prefer writing readable fluent-PHP rules with selectors, regex matching, and because-explanations over config-file-only tools
When to avoid
- your codebase does not use PHPStan and you are unwilling to adopt it as a dependency
- you need runtime or behavioral testing of code rather than static structural checks
- you require a guaranteed-stable API, since pre-1.0 releases may introduce breaking changes in minor versions
Facets
plugin · maturity active
testing linter developer-tools testing developer-tools backend php cli phpstan phpstan-extension static-analysis architecture-testing architecture-rules dependency-rules clean-architecture ddd composer php
10 sources
- readme: https://github.com/carlosas/phpat · fetched 2026-08-28 · 56c6b215ec7b
- homepage: https://phpat.dev · fetched 2026-08-29 · b26bce29ec9a
- site_page: https://www.phpat.dev/getting-started · fetched 2026-08-29 · a902e6172a4a
- site_page: https://www.phpat.dev/documentation/rules · fetched 2026-08-29 · b7781f0bf200
- site_page: https://www.phpat.dev/documentation/selectors · fetched 2026-08-29 · 44d0510caba9
- site_page: https://www.phpat.dev/documentation/assertions · fetched 2026-08-29 · cd7205d8048a
- site_page: https://www.phpat.dev/documentation/configuration · fetched 2026-08-29 · f57734d1d1df
- site_page: https://www.phpat.dev/documentation/other · fetched 2026-08-29 · bc2cd64b8b3f
- site_page: https://www.phpat.dev/about · fetched 2026-08-29 · 484da74cb9b9
- site_page: https://www.phpat.dev/CHANGELOG · fetched 2026-08-29 · 72fb154626e8
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| carlosas/phpat | main | 90 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem