Dev Tools · 1h ago
Hexagonal PHP Architecture: Enforcing Layer Boundaries with CI
A developer proposes a strict src/ layout for hexagonal PHP apps, mapping Domain, Application, and Infrastructure layers to PSR-4 namespaces. The approach includes a CI check that fails builds when imports violate layer rules. The goal is to prevent framework coupling from leaking into domain code.
Meridian48 take
The post offers a practical, enforceable pattern for hexagonal PHP, but its value depends on team discipline and whether the CI check is robust enough to catch all violations.
php-architecturehexagonal-architecture