I’ve been experimenting with Yii 2 beta and I plan to use it for an upcoming project (I don’t mind BC breaks). I’ve never used any flavour of Yii before.
The question I have is whether I’ve missed something regarding initializing a Yii app instance.
Currently I’ve got my own index.php which creates an instance of \yii\web\Application and calls the run method. I actually quite like this, but it’s something I’ve not encountered in any other framework I’ve used before so I’m wondering whether there’s something I’ve missed i.e. whether there is an existing “index.php” that does all of this?
Additionally, I’ve had to quickly put together some code which looks in a certain directory for bootstrap .php files to set up modules and things I want to use. For example, I’m planning to use Laravel’s Eloquent, which requires the setup of a container and such. In other frameworks such as the aforementioned Laravel, this would all be done in service providers. Is there an existing mechanism in Yii 2 for this? I suspect it may tie in with modules somehow.
Thanks in advance.