Great news - Yii2 in town! I decided to spend some time and switch this site for it. I use composer for dependencies and since Yii2 doesn't support it yet I added repository definition by myself. Here's what I came up with:
- Everything under namespaces (except
YiiBaseclasses which is questionable)
$thisisn't instance of current controller in views. It's instance of
\yii\base\Viewclass with bunch of interesting methods like
beginPage, head, beginBodyetc. You still can access controller through
- Asset manager supports bundles that looks promising but I wasn't able
to figure out how to forcePublish them on development environment
and it doesn't have old
- You have to use
echo $this->render('view')in controller actions
- For rendering partials in view you can use
echo $this->render('_partial')which is the same as
Still cannot figure out how to set up logger...
I haven't spent too much time playing with it, so I might be wrong somewhere. Definitely a lot of stuff was changed and a lot of stuff will be changed, and it certainly looks interesting and surely going to be fun!
UPD: They needed 3 days, now you can download yii2 from packagist.
P.S.: Here's a simple yii2 kickstart app on github. Comments are welcome!