Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Static Analysis & Code Quality
  3. PHPArkitect

PHPArkitect

MITPHP1.0.0

A PHP tool to enforce architectural constraints and prevent design violations in your codebase.

GitHubGitHub
903 stars53 forks0 contributors

What is PHPArkitect?

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.

Target Audience

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.

Value Proposition

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.

Overview

Put your architectural rules under test!

Use Cases

Best For

  • Enforcing layered architecture (e.g., Domain layer not depending on Infrastructure)
  • Maintaining naming conventions across controllers, services, or repositories
  • Preventing architectural drift in large PHP applications
  • Integrating architectural checks into CI/CD pipelines
  • Documenting architectural decisions as executable rules
  • Managing dependencies between components in a modular system

Not Ideal For

  • Projects relying heavily on runtime or dynamic code generation where static analysis cannot accurately trace dependencies
  • Teams needing instant, IDE-integrated feedback without running CLI commands during development
  • Legacy codebases with pervasive architectural violations where initial rule setup would be overwhelming without extensive baselining
  • Applications using multiple programming languages or non-PHP components where cross-language architectural checks are required

Pros & Cons

Pros

Architecture as Code

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.

Comprehensive Dependency Control

Enforces namespace dependencies and layer separation with precise rules like NotHaveDependencyOutsideNamespace, preventing architectural drift in medium to large projects.

Flexible Baseline Management

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.

CI/CD Integration Ready

Outputs results in multiple formats including JSON and GitLab code quality, facilitating easy integration into pipelines for automated checks and reporting.

Cons

Configuration Complexity

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.

Static Analysis Limitations

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.

Limited Pre-configured Rules

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.

Frequently Asked Questions

Quick Stats

Stars903
Forks53
Contributors0
Open Issues22
Last commit6 days ago
CreatedSince 2020

Tags

#layered-architecture#naming-conventions#dev-tools#architecture-enforcement#dependency-management#ci-cd#code-quality#testing#php#architecture#static-analysis

Built With

P
PHP

Included in

Static Analysis & Code Quality14.5k
Auto-fetched 6 hours ago

Related Projects

PHP ParserPHP Parser

A PHP parser written in PHP

Stars17,433
Forks1,120
Last commit2 months ago
TypeScript ESLintTypeScript ESLint

:sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript

Stars16,227
Forks2,911
Last commit1 day ago
pyrightpyright

Static Type Checker for Python

Stars15,406
Forks1,782
Last commit10 days ago
ReviewdogReviewdog

🐶 Automated code review tool integrated with any code analysis tools regardless of programming language

Stars9,263
Forks486
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub