From 8228d81b25caf2849608bbc7e0b0e6a235040fd7 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Mon, 22 May 2023 10:32:53 +0400 Subject: [PATCH] release version 2.0.48 --- framework/BaseYii.php | 2 +- framework/CHANGELOG.md | 43 ++++++++++++----------- framework/classes.php | 2 +- framework/db/conditions/LikeCondition.php | 2 +- framework/helpers/BaseFileHelper.php | 1 - framework/web/View.php | 2 +- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/framework/BaseYii.php b/framework/BaseYii.php index efc453add05..709ea7eacd2 100644 --- a/framework/BaseYii.php +++ b/framework/BaseYii.php @@ -93,7 +93,7 @@ class BaseYii */ public static function getVersion() { - return '2.0.48-dev'; + return '2.0.48'; } /** diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 8f5ec160bdc..196aa7111f5 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -1,40 +1,41 @@ Yii Framework 2 Change Log ========================== -2.0.48 under development ------------------------- +2.0.48 May 22, 2023 +------------------- -- Bug #19749: Add PHP 8.2 support (samdark, schmunk42, aldok10, DanaLuther) -- Bug #19743: Non-associative array values in AR weren't considered dirty when reordered (samdark) -- Bug #19807: Fix REST serializer not using `serializeModel()` when working with an array of models (zucha) -- Enh #19766: Add support for PHP generators to JSON helper (vladis84) -- Bug #19683: Updated `framework\mimeType.php` to the actual value. Fix typo in `build/controllers/MimeTypeController.php` (DeryabinSergey) -- Bug #19705: Add binary and other data types to `$typeMap` list for MySQL (sohelahmed7) -- Enh #19741: Added option to use a closure for `$variations` definition in `yii\filters\PageCache` (nadar) - Bug #15376: Added $userId for RBAC roles cache (manchenkoff) +- Bug #17194: Fix unnecessary SQL updates in the database on attributes typecast via `yii\behaviors\AttributeTypecastBehavior` (aivchen) - Bug #18867: Fixed multiple issues with `yii\grid\CheckboxColumn`: "check all" checkbox not being checked on page load when all data row checkboxes are initially checked; clicking checkboxes triggered "change" event for other checkboxes that do not change their state; "check all" checkbox not being checked when disabled checkboxes are present and clicking last non-checked data row checkbox (PowerGamer1) - Bug #19635: PHP 8.2 compatibility fix for `yii\validators\DateValidator` (PowerGamer1) -- Bug #17194: Fix unnecessary SQL updates in the database on attributes typecast via `yii\behaviors\AttributeTypecastBehavior` (aivchen) +- Bug #19683: Updated `framework\mimeType.php` to the actual value. Fix typo in `build/controllers/MimeTypeController.php` (DeryabinSergey) - Bug #19693: Fix db/Command not caching `NULL` result with scalar fetchMode (Arkeins) -- Enh #15376: Added cache usage for `yii\rbac\DbManager::getRolesByUser()` (manchenkoff) -- Enh #9740: Usage of DI instead of new keyword in Schemas (manchenkoff) -- Enh #19689: Remove empty elements from the `class` array in `yii\helpers\BaseHtml::renderTagAttributes()` to prevent unwanted spaces (MoritzLost) -- Chg #19696: Change visibility of `yii\web\View::isPageEnded` to `protected` (lubosdz, samdark) +- Bug #19705: Add binary and other data types to `$typeMap` list for MySQL (sohelahmed7) - Bug #19712: Cast shell_exec() output to string for jsCompressor (impayru) -- Bug #19734: PHP 8.1 compatibility fix for `$query->orderBy(null)` (uaoleg) +- Bug #19720: Fix "zh-HK" locale causing [error][yii\i18n\PhpMessageSource::loadFallbackMessages] The message file for category 'yii' doesn't exist (uaoleg) - Bug #19731: Fix `yii\data\Sort` to generate a proper link when multisort is on and attribute has a default sort order set (bizley) +- Bug #19734: PHP 8.1 compatibility fix for `$query->orderBy(null)` (uaoleg) - Bug #19735: Fix `yii\validators\NumberValidator` to use a programmable message for the value validation (bizley) +- Bug #19736: Fix `StringHelper::truncate(null, 10)` causes error `Deprecated: mb_strlen(): Passing null to parameter #1 ($string) of type string is deprecated` (uaoleg) +- Bug #19743: Non-associative array values in AR weren't considered dirty when reordered (samdark) +- Bug #19749: Add PHP 8.2 support (samdark, schmunk42, aldok10, DanaLuther) - Bug #19770: Fix `yii\mutex\MysqlMutex` `keyPrefix` expression param binding (kamarton) -- Enh #19794: Add caching in `yii\web\Request` for `getUserIP()` and `getSecureForwardedHeaderTrustedParts()` (rhertogh) - Bug #19795: Fix `yii\web\Response::redirect()` to prevent setting headers with URL containing new line character (bizley) -- Enh #19804: Remove the unnecessary call to `$this->oldAttributes` in `BaseActiveRecord::getDirtyAttributes()` (thiagotalma) +- Bug #19807: Fix REST serializer not using `serializeModel()` when working with an array of models (zucha) - Bug #19813: Fix `yii\base\DynamicModel` validation with validators that reference missing attributes (michaelarnauts) -- Enh #19816: Explicitly pass `$fallbackToMaster` as `true` to `getSlavePdo()` to ensure it isn't affected by child class with changed defaults (developedsoftware) - Bug #19828: Fix "strtr(): Passing null to parameter #1 ($string) of type string is deprecated" (uaoleg) -- Bug #19720: Fix "zh-HK" locale causing [error][yii\i18n\PhpMessageSource::loadFallbackMessages] The message file for category 'yii' doesn't exist (uaoleg) -- Bug #19736: Fix `StringHelper::truncate(null, 10)` causes error `Deprecated: mb_strlen(): Passing null to parameter #1 ($string) of type string is deprecated` (uaoleg) -- Enh #19838: Added `yii\helpers\BaseFileHelper::getExtensionByMimeType()` to get the most common extension for a given MIME type (rhertogh) - Bug #19837: Fixed processing of numeric file extensions in `yii\build\controllers\MimeTypeController::generateMimeTypesFile()` (rhertogh) +- Enh #9740: Usage of DI instead of new keyword in Schemas (manchenkoff) +- Enh #15376: Added cache usage for `yii\rbac\DbManager::getRolesByUser()` (manchenkoff) +- Enh #19689: Remove empty elements from the `class` array in `yii\helpers\BaseHtml::renderTagAttributes()` to prevent unwanted spaces (MoritzLost) +- Enh #19741: Added option to use a closure for `$variations` definition in `yii\filters\PageCache` (nadar) +- Enh #19766: Add support for PHP generators to JSON helper (vladis84) +- Enh #19794: Add caching in `yii\web\Request` for `getUserIP()` and `getSecureForwardedHeaderTrustedParts()` (rhertogh) +- Enh #19804: Remove the unnecessary call to `$this->oldAttributes` in `BaseActiveRecord::getDirtyAttributes()` (thiagotalma) +- Enh #19816: Explicitly pass `$fallbackToMaster` as `true` to `getSlavePdo()` to ensure it isn't affected by child class with changed defaults (developedsoftware) +- Enh #19838: Added `yii\helpers\BaseFileHelper::getExtensionByMimeType()` to get the most common extension for a given MIME type (rhertogh) +- Chg #19696: Change visibility of `yii\web\View::isPageEnded` to `protected` (lubosdz, samdark) + 2.0.47 November 18, 2022 ------------------------ diff --git a/framework/classes.php b/framework/classes.php index 439f757ce0b..46741e3180d 100644 --- a/framework/classes.php +++ b/framework/classes.php @@ -345,9 +345,9 @@ 'yii\validators\RequiredValidator' => YII2_PATH . '/validators/RequiredValidator.php', 'yii\validators\SafeValidator' => YII2_PATH . '/validators/SafeValidator.php', 'yii\validators\StringValidator' => YII2_PATH . '/validators/StringValidator.php', + 'yii\validators\TrimValidator' => YII2_PATH . '/validators/TrimValidator.php', 'yii\validators\UniqueValidator' => YII2_PATH . '/validators/UniqueValidator.php', 'yii\validators\UrlValidator' => YII2_PATH . '/validators/UrlValidator.php', - 'yii\validators\TrimValidator' => YII2_PATH . '/validators/TrimValidator.php', 'yii\validators\ValidationAsset' => YII2_PATH . '/validators/ValidationAsset.php', 'yii\validators\Validator' => YII2_PATH . '/validators/Validator.php', 'yii\web\Application' => YII2_PATH . '/web/Application.php', diff --git a/framework/db/conditions/LikeCondition.php b/framework/db/conditions/LikeCondition.php index 1efd890bd2e..0fe2a8fa0eb 100644 --- a/framework/db/conditions/LikeCondition.php +++ b/framework/db/conditions/LikeCondition.php @@ -42,7 +42,7 @@ public function __construct($column, $operator, $value) * * @param array|null|false an array of mappings from the special characters to their escaped counterparts. * You may use `false` to indicate the values are already escaped and no escape should be applied, - * or either `null` or empty array if escaping is condition builder responsibility. + * or either `null` or empty array if escaping is condition builder responsibility. * Note that when using an escape mapping (or the third operand is not provided), * the values will be automatically enclosed within a pair of percentage characters. */ diff --git a/framework/helpers/BaseFileHelper.php b/framework/helpers/BaseFileHelper.php index fda64f10d4f..55445aec009 100644 --- a/framework/helpers/BaseFileHelper.php +++ b/framework/helpers/BaseFileHelper.php @@ -39,7 +39,6 @@ class BaseFileHelper * @since 2.0.14 */ public static $mimeAliasesFile = '@yii/helpers/mimeAliases.php'; - /** * @var string the path (or alias) of a PHP file containing extensions per MIME type. * @since 2.0.48 diff --git a/framework/web/View.php b/framework/web/View.php index c621e5777e5..f2c19fc721f 100644 --- a/framework/web/View.php +++ b/framework/web/View.php @@ -133,6 +133,7 @@ class View extends \yii\base\View private $_assetManager; + /** * Whether [[endPage()]] has been called and all files have been registered * @var bool @@ -140,7 +141,6 @@ class View extends \yii\base\View */ protected $isPageEnded = false; - /** * Marks the position of an HTML head section. */