We are very pleased to announce the release of Yii Framework version 2.0.12. Please refer to the instructions at http://www.yiiframework.com/download/ to install or upgrade to this version.
Version 2.0.12 is a minor release of Yii 2.0 which contains more than 100 enhancements and bug fixes.
There are minor changes that may affect your existing applications so make sure to check the UPGRADE.md file.
Thank you, Yii community for supporting the project. We did it together!
You may follow the development progress of Yii 2 by starring or watching Yii 2.0 GitHub Project. You may also follow Yii Twitter feeds or join Yii Facebook group to connect with other Yii developers. There is also a forum thread about this news announcement.
This release took a bit longer than expected as we are busy with some other things currently. For example we are working on getting a new website setup and in less than two weeks, a Yii conference will be held in Moscow.
Since there's Yii 2.1 in development, make sure you have
~2.0.12 in your
composer.json instead of
* so when next major version of Yii is released, your project won't break by itself.
Below we summarise some of most important features/fixes included in this release. A complete list of changes can be found in the CHANGELOG.
Database support got a few enhancements regarding using expressions. Now you can use them in
MSSQL support was enhanced. First, schema reading performance was increased significantly. Second,
yii\db\mssql\QueryBuilder::resetSequence() was implemented.
yii\base\Security::hkdf()was improved to take advantage of native
hash_hkdf()implementation in PHP >= 7.1.2.
mt_rand()is now used instead of
Migrations template was changed to use
safeDown(). In case changing schema in transactions is not supported,
such as in case with MySQL, it silently executes migration methods without transaction.
Various framework components got more same defaults:
\yii\data\SqlDataProvidernow provides automatic fallback for the case when
totalCountis not specified.
- Data provider now automatically sets an ID so there is no need to set it manually in case multiple data providers are used with pagination.
yii\grid\DataColumnfilter is automatically generated as dropdown list in case of
yii cache command now warns about the fact that it's not able to flush APC cache from console.
yii\filters\AccessRule now allows passing parameters to the role checking function.
- Added support for caching of
yii\web\UrlManagerfor rules with defaults.
- Added option to disable query logging and profiling in DB command
yii\data\ActiveDataProviderno longer queries models if models count is zero.
StringHelper got URL-safe base64 encode()/decode() methods. Should be useful for various tokens.
yii\helpers\Html::img() now allows you to specify
echo Html::img('/base-url', [ 'srcset' => [ '100w' => '/example-100w', '500w' => '/example-500w', '1500w' => '/example-1500w', ], ]);
It's now possible to render current
yii\widgets\LinkPager page disabled by setting
disableCurrentPageButton to true.
Access control and validators got better by requiring less dependencies:
yii\filters\AccessControlnow can be used without
- Core validators no longer require
Yii::$appto be set.