Lucky 7th digest dedicated to Beta release . Not so much really new to say after Beta release notes on Yii site, but I can't stay away :)
Thanks for a big PR campaign by Alexander Makarov (@sam_dark), previous dev digest was seen by more than 5500 people. Quite impressive and gives me more inspiration to make new reviews!
As usual - Russian version of this digest is available (see the link above) !
tl;dr;
Yii2 beta Release, PSR-2, DI, new RBAC, consistent Url helper, a lot of new widgets
- Yii 2 beta Released on April 13. Official press-release is great in details, you should definitely read it through. Russian press-release.
- Official docs for Yii 2.0
Yii2 now follow PSR-2. Yes "Space" intendation wins. Now tools like PHPCodeSniffer will work with Yii2 better.
It is not about pro-contra features, it's just about having the same standard across the PHP world.
Dependecy Injection container out of the box. Yii2 is not migrating completely to DI concepts, but gives you an utility class for DI in your app.
- Introduced universal URL helper class. Samdark made a good explanation in Russian in his blog also in Beta release notes it has good usage examples. Very handy helper class!
- Remastered RBAC. Biz rules are separate classes now, no eval.
- Conditional validators. Custom anonymous function
when
could be use with all validators to have additional control on validator usage. AlsowhenClient
for a client side. - REST Api got more improvements, but still something left fot RC and GA releases.
- Added
ContentNegotiator
to support response format and language negotiation - Added separate
bootstrap
ability to init different Classes on each App run. Similar to formerpreload
, but now it is unified way for Extensions and Components. - Added
loadDefaultValues
for AR Model. As a generic way to set default values and not overuse "default" validator or custominit
. - More consistent AR
find()
usage. IntroducedfindOne
andfindAll
. - Ability to use Gii via CLI
- Added
yii\web\ViewAction
that allow render views based on GET parameter, aka Static Pages - Added
PrefixUrlRule
that represents a collection of URL rules sharing the same prefix in their patterns and routes.. It is best used by a module which often uses module ID as the prefix for the URL rules. - There will no be offficial out of the box integration with Bower. It's considered not a server-side framework core issue - and I am agree with it. In any case thos who need it - will find a way to use with his tools stack.
- Non official examples of custom app structures
Read more ...