Two different ways to organize your folders:
- By class type
- By domain
Yii application example uses the first type. I’m thinking the second alternative might put files together in a single folder that have tighter coupling. E.g. PostController has tight coupling with PostEntity, PostRepository, PostDTO, etc, not so much with CommentController.
Second alternative might be better to isolate change.
Edit: Oh, you actually did this in the Yii example app. Great! yii-demo/src at master · yiisoft/yii-demo · GitHub