Yii News 2020 Issue 5

Greetings!



Time for the next Yii news release. Both Yii 2 and Yii 3 are doing well :)



In fact, this year there were four more before this release, as follows from the serial number. But I was so carried away by Yii 3 that I forgot about the habr ... You can read them right on the main https://yiiframework.ru/ . Or, if you prefer English, on our OpenCollective page .


Finally, we got around to updating the team page on the official website.

Konstantin Sirotkin is back and is actively expanding Yii 2 ElasticSearch.

The core team of Yii 3 has been formed. In general, this actually happened at the end of 2019. The names are probably known to you as they were mentioned in previous releases.



We've partially moved tests to GitHub actions . The flight is wonderful, we recommend it. We add static analysis through phan

and run tests through Infection to further improve the quality of the code.



I spent a little time on YiiPowered , where we build Yii projects. Now there are 571 projects. The improvements are:



  • You can add projects on Yii 3.0.
  • For projects for which screenshots are not completed, they are taken and loaded automatically every night.


In the last issue, I mentioned the PHP Russia Online conference .

It went well. Videos available .



As an experiment, I recorded a screencast while working on the framework .

I'd like to know your opinion. Is it worth writing more? Do you want to know about some part of the framework or development process?



Yii 2



Version 2.0.36 has been released . This is an important update due to the improvements in the

DI container. It got a little closer to Yii 3.



In action for both web and console controllers, you can now do this:



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 improvement is that it Instance::of()started working in arrays:



return [
    ContentTypeMiddleware::class => [
        '__construct()' => [
            Instance::of(StreamFactory::class),
            [
                'json' => Intance::of(JsonFormatter::class),
                'yaml' => Intance::of(YamlFormatter::class),
            ],
        ],
    ],
];


Additionally, the following extensions have been released:





Yii 3



-, . Yii 3.

, , , . .











Trello.



:





:









๏ธ !



, Yii 3. .



, Yii 3 :






All Articles