We are very pleased to announce the release of Yii Framework version 2.0.36. Please refer to the instructions at https://www.yiiframework.com/download/ to install or upgrade to this version.
Version 2.0.36 is an interesting release.
- A big part of it is MSSQL-related fixes made by @DarkDef. Additionally to these, he added MSSQL tests to GitHub actions pipeline so what's covered by tests won't break anymore.
- Regressions in
ArrayHelper::getValue()
andEachValidator
from last release were fixed. Mutex::isAcquired()
was added so you can check if mutex is acquired without acquiring it.- jQuery 3.5.0 compatibility was declared so this version can now be used.
- Hindi translation for messages was added.
Last but not least, there are two additions to dependency injection container that are bringing Yii 2 container closer in capabilities to what we have in Yii 3.
First, action injection was implemented by @SamMousa, @ErickSkrauch, and @samdark. In both web controller actions and console controller actions, the following now is possible:
namespace app\controllers;
use yii\web\Controller;
use app\components\BookingInterface;
class HotelController extends Controller
{
public function actionBook($id, BookingInterface $bookingService)
{
$result = $bookingService->book($id);
// ...
}
}
Another enhancement brought by @hiqsol is that references are now resolved in arrays:
return [
ContentTypeMiddleware::class => [
'__construct()' => [
Instance::of(StreamFactory::class),
[
'json' => Intance::of(JsonFormatter::class),
'yaml' => Intance::of(YamlFormatter::class),
],
],
],
];
There are more fixes included. A complete list of changes can be found in the CHANGELOG.
Thanks to all Yii community members who contribute to the framework, translators who keep documentation translations up to date and community members who answer questions at forums.
There are many active Yii communities so if you need help or want to share your experience, feel free to join them.