Ultra-fast configurable PHP architecture guards: define your layers and rules, then keep them enforced.
StructArmed is ultra-fast, even on large codebases.
See the PHP toolchain benchmarks
StructArmed turns architecture decisions into executable checks. It's already used by projects such as CakePHP, CodeIgniter4, Spiral, Mezzio, Testo, and Mockery.
Start with presets for PSR, MVC, or DDD projects, then tune or extend the rules in native PHP.
Spot architecture violations directly in your terminal:
composer require --dev boundwize/structarmed
vendor/bin/structarmed init --preset=psr4
vendor/bin/structarmed analyseDocumentation is available online, with source files kept in this repository:
- Documentation site: https://boundwize.github.io/structarmed/
- Documentation source: docs/ for local edits and GitHub Pages publishing.
Explore community projects built around StructArmed.
| Project | Description |
|---|---|
| StructArmed Explorer | Explore structarmed.php as an interactive layer-dependency graph in your browser. |
| StructArmed CakePHP | CakePHP 5 presets for MVC and commands, with plugin namespace support. |
| SARIF PHP Converters for StructArmed | Convert the StructArmed JSON report to SARIF for code scanning tools and SARIF viewers. |
Contributions are welcome. See CONTRIBUTING.md for setup, tooling, and pull request expectations.
StructArmed is released under the MIT License.
