[news] Yii 2.0.48


We are pleased to announce the release of Yii Framework version 2.0.48.
Please refer to the instructions at https://www.yiiframework.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

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.
A complete list of changes can be found in the CHANGELOG.