本文共 5443 字,大约阅读时间需要 18 分钟。
yii2 yii_env
Hello, community!
您好,社区!
It is time for another Yii news issue. Both Yii 2 and Yii 3 are doing well.
现在是时候发布另一个Yii新闻了。 Yii 2和Yii 3都表现不错。
I've finally updated on the website to reflect the current state of things.
我终于更新网站上 ,以反映当前的状况。
Konstantin Sirotkin is back and actively taking care of ElasticSearch Yii 2 extension.
Konstantin Sirotkin回来并积极照顾ElasticSearch Yii 2扩展。
Yii 3 main team was formed (actually happened late 2019). Likely you know the names because most were mentioned in previous Yii news issues.
Yii 3主队成立(实际上发生在2019年末)。 您可能知道这些名字,是因为大多数名字在以前的Yii新闻中都提到过。
Also, we have . Experience is great so far, so we can definitely recommend that. We're adding and running tests with to make code quality even better.
另外,我们已经 。 到目前为止,经验非常好,所以我们绝对可以推荐。 我们添加了并使用运行测试,以提高代码质量。
I've spent some time on , a place to collect Yii-powered projects that has 571 projects listed so far. Enhancements are:
我花了一些时间在上, 是一个收集Yii驱动的项目的地方,到目前为止已列出571个项目。 增强功能包括:
Last time I have mentioned conference. It went well and videos .
上次我提到过会议。 进行得很顺利,视频 。
As an experiment, I've recorded a video of . I'd really like to know your opinion on it. Is it worth doing something like these more? Do you want to know any part of the Yii development process or internals?
作为实验,我录制了一段的视频。 我真的很想知道您对此的看法。 值得做更多这样的事情吗? 您是否想知道Yii开发过程的任何部分或内部?
. It is an important release because of dependency injection container enhancements. It is now closer in features to the one in Yii 3.
。 由于依赖项注入容器的增强,它是一个重要的版本。 现在,它的功能更接近Yii 3中的功能。
In both web controller actions and console controller actions, the following now is possible:
现在,在Web控制器操作和控制台控制器操作中,都可以进行以下操作:
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 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), ], ], ],];
Additionally, the following extension releases were made:
此外,还发布了以下扩展版本:
enhancing Composer 2 support.
增强了对Composer 2的支持。
ElasticSearch and fixing bugs in "legacy" releases.
ElasticSearch 和修复了“旧版”发行版中的错误。
First, . You can start exploring Yii 3 with it. It is not final but should give you a good overview of Yii 3. Suggestions are very welcome.
首先,实现 。 您可以开始使用它探索Yii 3。 它不是最终的,但应该使您对Yii 3有一个很好的了解。非常欢迎提出建议。
with 100% test coverage and a .
了具有100%的测试覆盖率和 。
was released adding PHP 8 support.
发布了 ,增加了对PHP 8的支持。
were added to . There were other enhancements as well.
已添加到 。 还有其他增强功能。
More tests were added to , .
和添加了更多测试。
you probably know as "remember me" was implemented.
您可能知道的“记住我” 已实现。
was covered with more tests and can now rebuild configs without preliminary build. It now also generates fewer files and has limited support for environment variables. Finally, it now works with Composer 2.
已进行了更多测试,并且无需重新构建即可立即重建配置。 现在,它还生成更少的文件,并且对环境变量的支持有限。 最后,它现在可以与Composer 2一起使用。
.
。
Console application got ApplicationStartup
and ApplicationShutdown
events, and a nice way to configure event handlers via config/events-console.php
. These are .
控制台应用程序具有ApplicationStartup
和ApplicationShutdown
事件,并且是通过config/events-console.php
配置事件处理程序的好方法。 这些 。
Overall config was refreshed adopting a new style and allowing more customization.
整体配置已更新,采用了新样式并允许更多自定义。
was implemented.
已实现。
.
。
was redesigned and was implemented for it.
重新设计了 ,并为其实现了 。
modifier was added to the arrays package. It is used in event configs in the application to ensure the correct order of handlers.
修饰符已添加到数组包中。 它在应用程序的事件配置中使用,以确保处理程序的正确顺序。
package was implemented.
程序包已实现。
Configuration style more or less formed. .
配置样式或多或少形成。 。
got more cleanup, new configs style, and some extra features.
了更多的清理,新的配置样式以及一些其他功能。
.
。
was covered with more tests and got some bugfixes.
包含更多测试,并提供了一些错误修复。
.
。
we use to develop Yii 3 with, got more tests and new features such as
我们用来开发Yii 3的 ,获得了更多测试和新功能,例如
.
。
DI container started to resolve Reference::to()
inside of arrays.
DI容器开始解析数组内部的Reference::to()
。
for the was implemented. It is currently used in the application template.
已实现。 当前在应用程序模板中使用它。
Progress was made on .
已取得进展。
.
。
A bigger picture is available in .
提供了更大的图像。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
I'd like to thank all backers and contributors making Yii 3 possible. We are moving it forward together.
我要感谢所有支持者和贡献者,使Yii 3成为可能。 我们正在一起前进。
Special thanks for Yii 3 code contributions goes to:
特别感谢Yii 3代码贡献给:
.
。
.
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
.
。
翻译自:
yii2 yii_env
转载地址:http://nmbwd.baihongyu.com/