1 min readCalm pace · scan the outline anytime

CakePHP persistence

CakeORM Table / Entity stays in Infrastructure for Modular Hexagonal DDD.

CakePHP persistence

Host: CakePHP 5.4.x (PHP 8.2–8.5) · Researched 2026-08
One-shot: /apply/cakephp.full.md · Short: /cakephp

Cake Table and Cake Entity are not Domain Entities. Keep them under Infrastructure and map to Domain Entities in repositories.

plugins/{Module}/src/Infrastructure/Persistence/
  Table/
  Repository/

From CakePHP 5.3+, TableContainer may inject Tables into Infra services — never into Domain/Use Cases.

Modular Hexagonal Domain-Driven Design
Core 1.0.0-draft