1 min readCalm pace · scan the outline anytime

Yii persistence

Cycle ORM (Yii3) / ActiveRecord (Yii2 Infra only) stays in Infrastructure for Modular Hexagonal DDD.

Yii persistence

Host: Yii Yii3 (yiisoft/*); Yii2 brownfield (PHP ≥ 8.2 (Yii3)) · Researched 2026-08
One-shot: /apply/yii.full.md · Short: /yii

Yii3 + Cycle

Use yiisoft/yii-cycle. Cycle entities and schema config stay in Infrastructure.

{Module}/Infrastructure/Persistence/Cycle/
  Entity/
  Repository/

Repositories implement Domain ports and map Cycle records → Domain Entities.

Yii2 brownfield

yii\db\ActiveRecord only inside Infra repositories. Never in Domain/Use Cases.

Anti-patterns

SmellFix
AR in Use CasePort + Infra repo
Cycle ORM injected into DomainPort only
Modular Hexagonal Domain-Driven Design
Core 1.0.0-draft