PHPackages                             structuraphp/structura - 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. structuraphp/structura

ActiveLibrary[Testing &amp; Quality](/categories/testing)

structuraphp/structura
======================

Architectural testing for PHP

0.8.0(3mo ago)141.6k2[1 issues](https://github.com/structuraphp/structura/issues)[2 PRs](https://github.com/structuraphp/structura/pulls)3MITPHPPHP ^8.2|^8.3|^8.4|^8.5CI passing

Since Apr 9Pushed 1mo agoCompare

[ Source](https://github.com/structuraphp/structura)[ Packagist](https://packagist.org/packages/structuraphp/structura)[ RSS](/packages/structuraphp-structura/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (37)Versions (28)Used By (3)

 [![Structura Logo](docs/structura-logo.png)](docs/structura-logo.png)

Structura
=========

[](#structura)

Maintain a clean and consistent code structure with expressive architecture rules.

[![License](https://camo.githubusercontent.com/6291258e56251674d3a9dcf0f554d1609a15d951283aa6aea066e94fc48a3033/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7374727563747572617068702f7374727563747572612e737667)](https://github.com/structuraphp/structura/blob/main/LICENSE "LICENSE")[![PHP from Packagist](https://camo.githubusercontent.com/f6d2f3b191622abb50590fd4767df3d6913a91564d5e33dba3e53f9e1745993b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e322d253233383839326266)](/README.md#php-version "PHP version 8.2 minimum")[![Packagist Downloads](https://camo.githubusercontent.com/5fade8a7880463a88e6fedcb7a7358bc4aaf825217ebc3d732a39c89cf3c964a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f7374727563747572617068702f737472756374757261)](https://packagist.org/packages/structuraphp/structura "packagist downloads")

About
-----

[](#about)

Structura is an architectural testing tool for PHP, designed to help developers maintain a clean and consistent code structure.

📖 Documentation
---------------

[](#-documentation)

Full documentation is available at **[structuraphp.github.io/structura](https://structuraphp.github.io/structura)**.

Quick Start
-----------

[](#quick-start)

### Installation

[](#installation)

```
composer require --dev structuraphp/structura
```

### Configuration

[](#configuration)

```
php vendor/bin/structura init
```

### Run

[](#run)

```
php vendor/bin/structura analyze
```

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

[](#requirements)

PHP VersionStructura 0.x&lt;= 8.1✗ Unsupported8.2 / 8.3 / 8.4 / 8.5✓ SupportedWith PHPUnit
------------

[](#with-phpunit)

Structura can integrate architecture testing with PHPUnit:

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

[](#inspiration)

StructuraPHP is the result of current tools failing to meet, or only partially meeting, our needs as an architecture testing tool.

Our design and features are heavily inspired by the following tools:

- [ArchUnit](https://github.com/TNG/ArchUnit): for rules
- [Arkitect](https://github.com/phparkitect/arkitect): for rules, independence, full php,
- [Deptract](https://github.com/deptrac/deptrac): for rules
- [Pest Architecture](https://pestphp.com/docs/arch-testing): for rules, function names, output format,
- [PhpUnit](https://github.com/sebastianbergmann/phpunit/): for test classes, flags,
- [Phpat](https://github.com/carlosas/phpat): for rules.

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance84

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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 ~26 days

Recently: every ~38 days

Total

16

Last Release

101d ago

PHP version history (2 changes)v0.0.1PHP ^8.2|^8.3|^8.4

0.5.0PHP ^8.2|^8.3|^8.4|^8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e895b534ebcc8bd54a08b36cad6507da36117a7146b88e62ad53fa45c96c362?d=identicon)[noelma](/maintainers/noelma)

---

Top Contributors

[![mathieu-noel](https://avatars.githubusercontent.com/u/200080698?v=4)](https://github.com/mathieu-noel "mathieu-noel (89 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

55344.7k5](/packages/jolicode-castor)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

136411.0k14](/packages/rector-rector-src)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k30.0M2.8k](/packages/infection-infection)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[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.8M248](/packages/deptrac-deptrac)

PHPackages © 2026

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