Yii composition root
Host: Yii Yii3 (yiisoft/*); Yii2 brownfield (PHP ≥ 8.2 (Yii3)) · Researched 2026-08
One-shot:/apply/yii.full.md· Short:/yii
Yii3
Bindings in config/common/di/{module}.php (loaded into shared di group). Web/console-specific bindings in web/di / console as needed.
return [
PortInterface::class => Adapter::class,
];
Yii2
Use Yii::$container in Module bootstrap/init for binds — still wiring only.
When a module becomes a Composer package, declare extra.config-plugin for di/routes.