A PHP tool to enforce architectural constraints and prevent design violations in your codebase.
PHPArkitect is a static analysis tool for PHP that allows developers to define and enforce architectural rules in their codebase. It helps maintain clean architecture by preventing violations like improper dependencies, naming inconsistencies, and layer breaches, providing early feedback during development or in CI/CD pipelines.
PHP developers and teams working on medium to large-scale applications who need to maintain architectural consistency, enforce design patterns, and prevent technical debt as their codebase grows.
Developers choose PHPArkitect because it turns architectural guidelines into executable code, offers a rich set of built-in rules with a fluent API, integrates seamlessly into development workflows, and catches design violations before they become costly to fix.
Put your architectural rules under test!
Rules are defined in readable PHP, making them executable and self-documenting, as demonstrated in the configuration examples where constraints like naming conventions are expressed in simple code.
Enforces namespace dependencies and layer separation with precise rules like NotHaveDependencyOutsideNamespace, preventing architectural drift in medium to large projects.
Supports generating and using baseline files to ignore existing violations while catching new ones, with options to ignore line numbers to handle code changes without false positives.
Outputs results in multiple formats including JSON and GitLab code quality, facilitating easy integration into pipelines for automated checks and reporting.
Defining accurate architectural rules requires deep understanding of the codebase and design patterns, which can be time-consuming and error-prone for teams without architectural expertise.
As a static tool, it may miss runtime dependencies or context-specific violations, and false positives can occur with complex code patterns, such as those using reflection or dynamic imports.
While it offers rule builders, it lacks out-of-the-box rule sets for common frameworks, requiring custom setup for each project, unlike some code quality tools with built-in presets.
A PHP parser written in PHP
:sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript
Static Type Checker for Python
🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.