博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
yii2 yii_env_Yii新闻2020年第5期
阅读量:2509 次
发布时间:2019-05-11

本文共 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个项目。 增强功能包括:

  • Ability to add projects made with Yii 3.0.

    能够添加使用Yii 3.0创建的项目。
  • Images are automatically fetched from the real website every night for published projects with missing images.

    对于已发布的项目,如果有丢失的图像,则每晚都会从真实的网站上自动获取图像。

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开发过程的任何部分或内部?

Yii 2 (Yii 2)

. 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 和修复了“旧版”发行版中的错误。

Yii 3 (Yii 3)

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 packages got strict types.

    更多的软件包具有严格的类型。
  • 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 .

    控制台应用程序具有ApplicationStartupApplicationShutdown事件,并且是通过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()

  • Automatic inflection-based naming for forms and controller IDs was introduced to ease day-to-day development.

    引入了基于自动变形的表单和控制器ID命名,以简化日常开发。
  • for the was implemented. It is currently used in the application template.

    已实现。 当前在应用程序模板中使用它。

  • Progress was made on .

    已取得进展。

  • .

A bigger picture is available in .

提供了更大的图像。

新的和调整后的内部准则: (New and adjusted internal guidelines:)

  • .

新的和调整后的指南页面: (New and adjusted guide pages:)

  • .

  • .

  • .

  • .

  • .

  • .

  • .

  • .

  • .

  • .

  • .

  • .

阅读建议 (Reading recommendations)

️谢谢! (️ Thank you!)

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/

你可能感兴趣的文章
苹果CEO乔布斯(Steve Jobs)20050612在斯坦福大学的演讲
查看>>
[Oracle学习笔记] 基本表空间的创建,修改和删除
查看>>
Delphi 接口(4) 互相依赖的接口
查看>>
Thymeleaf 模板 引用头部 尾部 最简单教程
查看>>
还是正则基础
查看>>
U-BOOT配置过程
查看>>
es修改排序_Elasticsearch 中的索引排序
查看>>
python对数字进行简单的可逆加密_Python实现简单的可逆加密程序实例
查看>>
es任务 如何kill_怎么样杀死所有进程?批量结束所有进程命令kill使用方法
查看>>
foxbot机器人指令_工业机器人Foxbot已成富士康新宠?
查看>>
nacos注册服务失败_nacos 注册服务
查看>>
通过思科构造局域网_思科路由器设置手册虚拟局域网(VLAN)路由-路由器
查看>>
shell输出毫秒_linux shell 获取毫秒数 计时
查看>>
卫片图斑_制作和下发卫片执法图斑
查看>>
metabase 以链接或图片查看_智能化弱电工程优秀施工工艺做法图片展示
查看>>
vue链接规则_vue二级菜单添加链接+点击二级菜单渲染页面
查看>>
linux mysql 实例_linux下安装第二个mysql实例过程
查看>>
搜索mysql语句优化_Mysql查询语句优化
查看>>
mysql redhat rmp_MySQL在linux上的rpm包方式安装方法
查看>>
hibernate mysql demo_hibernate简单的demo
查看>>