2023-05-22 864次浏览

我们非常高兴地宣布 Yii Framework 2.0.48 版本发布了。

Please refer to the instructions at https://www.yiichina.com/download/ to install or upgrade to this version.

This release has a number of bugfixes and adds PHP 8.2 compatibility as well as some small enhancements:

  • Usage of DI instead of new keyword in Schemas
  • Added cache usage for yii\rbac\DbManager::getRolesByUser()
  • Remove empty elements from the class array in yii\helpers\BaseHtml::renderTagAttributes() to prevent unwanted spaces
  • Added option to use a closure for $variations definition in yii\filters\PageCache
  • Add support for PHP generators to JSON helper
  • Add caching in yii\web\Request for getUserIP() and getSecureForwardedHeaderTrustedParts()
  • Remove the unnecessary call to $this->oldAttributes in BaseActiveRecord::getDirtyAttributes()
  • Explicitly pass $fallbackToMaster as true to getSlavePdo() to ensure it isn't affected by child class with changed defaults
  • Added yii\helpers\BaseFileHelper::getExtensionByMimeType() to get the most common extension for a given MIME type
  • Change visibility of yii\web\View::isPageEnded to protected

感谢所有为该框架做出贡献的 Yii 社区成员,翻译人员保持最新文档翻译,以及在论坛上回答问题的社区成员。

Yii 有许多活跃的社区,因此,如果您需要帮助或想分享自己的经验,请随时加入。

更改的完整列表可以在更新日志中找到。