PHPackages                             boundwize/structarmed - 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. boundwize/structarmed

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

boundwize/structarmed
=====================

Configurable PHP architecture guards — define your layers and rules, then keep them enforced

0.14.15(1w ago)45629.2k—5%320MITPHPPHP ^8.2CI passing

Since May 8Pushed 1w ago2 watchersCompare

[ Source](https://github.com/boundwize/structarmed)[ Packagist](https://packagist.org/packages/boundwize/structarmed)[ Docs](https://github.com/boundwize/structarmed)[ GitHub Sponsors](https://github.com/samsonasik)[ RSS](/packages/boundwize-structarmed/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (43)Versions (125)Used By (20)

StructArmed
===========

[](#structarmed)

 [![StructArmed](https://private-user-images.githubusercontent.com/459648/593141974-18024dc9-8658-40ca-abec-2df7b675a3b8.webp?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODQzNTM0MzQsIm5iZiI6MTc4NDM1MzEzNCwicGF0aCI6Ii80NTk2NDgvNTkzMTQxOTc0LTE4MDI0ZGM5LTg2NTgtNDBjYS1hYmVjLTJkZjdiNjc1YTNiOC53ZWJwP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDcxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA3MThUMDUzODU0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YTA3ODIyNDU1NzlhODdiYjY3M2VjYzcyZjg1ZDBkNmM1NDg0ZGVlNjFjMzA5ZTY4ZDMwMDk0YTkxYWQ2MDNhNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGd2VicCJ9.O5dZE1vJGJFV4NpZSBhjrMHtCMsn5pVBHKHGpA8dmdU)](https://private-user-images.githubusercontent.com/459648/593141974-18024dc9-8658-40ca-abec-2df7b675a3b8.webp?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODQzNTM0MzQsIm5iZiI6MTc4NDM1MzEzNCwicGF0aCI6Ii80NTk2NDgvNTkzMTQxOTc0LTE4MDI0ZGM5LTg2NTgtNDBjYS1hYmVjLTJkZjdiNjc1YTNiOC53ZWJwP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDcxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA3MThUMDUzODU0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YTA3ODIyNDU1NzlhODdiYjY3M2VjYzcyZjg1ZDBkNmM1NDg0ZGVlNjFjMzA5ZTY4ZDMwMDk0YTkxYWQ2MDNhNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGd2VicCJ9.O5dZE1vJGJFV4NpZSBhjrMHtCMsn5pVBHKHGpA8dmdU)

 Configurable PHP architecture guards: define your layers and rules, then keep them enforced.

[![Latest Version](https://camo.githubusercontent.com/b1f4277d707d44cd8799d1f4eec216f313fc8894e1c06c0f1c94b827179ee6b0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f626f756e6477697a652f73747275637461726d65642e7376673f7374796c653d666c61742d737175617265)](https://github.com/boundwize/structarmed/releases)[![ci build](https://github.com/boundwize/structarmed/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/boundwize/structarmed/actions/workflows/ci.yml)[![Code Coverage](https://camo.githubusercontent.com/2d45e5c3271789fe2119afebd5444f4f1462673689049f2d2507b04d67ff2c37/68747470733a2f2f636f6465636f762e696f2f67682f626f756e6477697a652f73747275637461726d65642f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/boundwize/structarmed)[![PHPStan](https://camo.githubusercontent.com/fdcdf50c27377a0f41a7196eeaae8539c4684bfc8a1f9843fdac60fdbc53deab/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374796c652d6c6576656c2532306d61782d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265266c6162656c3d7068707374616e)](https://github.com/phpstan/phpstan)[![Downloads](https://camo.githubusercontent.com/ad391bc93c4d93c11c25b62148772310ad0268e637fdcc27ba0deb6047ba778f/68747470733a2f2f706f7365722e707567782e6f72672f626f756e6477697a652f73747275637461726d65642f646f776e6c6f616473)](https://packagist.org/packages/boundwize/structarmed)

[![Windows](https://camo.githubusercontent.com/40d55ea84a66155f7e5a3ca552f53374c32693147bb1def55b3522fe5f4964c7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f57696e646f77732d737570706f727465642d3030373844363f6c6f676f3d77696e646f7773266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d353535353535)](https://camo.githubusercontent.com/40d55ea84a66155f7e5a3ca552f53374c32693147bb1def55b3522fe5f4964c7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f57696e646f77732d737570706f727465642d3030373844363f6c6f676f3d77696e646f7773266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d353535353535)[![macOS](https://camo.githubusercontent.com/87062865228d41f8646f09e2f5836456aaecf50f98a01a95ed649d9e9046e226/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61634f532d737570706f727465642d4330383446433f6c6f676f3d6170706c65266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d353535353535)](https://camo.githubusercontent.com/87062865228d41f8646f09e2f5836456aaecf50f98a01a95ed649d9e9046e226/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61634f532d737570706f727465642d4330383446433f6c6f676f3d6170706c65266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d353535353535)[![Linux](https://camo.githubusercontent.com/ecaba20632a2d08464c0ce7f3f974a13a937dd5acf6f9d0d1065325b78475899/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c696e75782d737570706f727465642d4643433632343f6c6f676f3d6c696e7578266c6f676f436f6c6f723d626c61636b266c6162656c436f6c6f723d353535353535)](https://camo.githubusercontent.com/ecaba20632a2d08464c0ce7f3f974a13a937dd5acf6f9d0d1065325b78475899/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c696e75782d737570706f727465642d4643433632343f6c6f676f3d6c696e7578266c6f676f436f6c6f723d626c61636b266c6162656c436f6c6f723d353535353535)

StructArmed turns architecture decisions into executable checks. Start with presets for PSR, MVC, or DDD projects, then tune or extend the rules in native PHP.

 [![StructArmed violation](./docs/assets/structarmed-showoff.svg)](./docs/assets/structarmed-showoff.svg)

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

[](#quick-start)

```
composer require --dev boundwize/structarmed
vendor/bin/structarmed init --preset=psr4
vendor/bin/structarmed analyse
```

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

[](#documentation)

Documentation is available online, with source files kept in this repository:

- Documentation site:
- Documentation source: [docs/](docs/index.md) for local edits and GitHub Pages publishing.

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

[](#contributing)

Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, tooling, and pull request expectations.

License
-------

[](#license)

StructArmed is released under the [MIT License](LICENSE).

###  Health Score

59

—

FairBetter than 98% of packages

Maintenance98

Actively maintained with recent releases

Popularity51

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity54

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

Total

118

Last Release

13d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/19076b7688ca1c8ee79ab3ac6fa6acdd7b96012973aba3b1a06cbb3154d7f3e5?d=identicon)[samsonasik](/maintainers/samsonasik)

---

Top Contributors

[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (891 commits)")

---

Tags

analysisarchitecturelayerphpstaticdevstatic analysismvcanalysisarchitecturelayerdddpsr15psr4Enforcementpsr12psr1

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[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.2k28.9M2.6k](/packages/infection-infection)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M26.2k](/packages/friendsofphp-php-cs-fixer)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[deptrac/deptrac

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

3.0k8.8M207](/packages/deptrac-deptrac)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.9k82.2M8.0k](/packages/vimeo-psalm)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)

PHPackages © 2026

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