From 00363cbe6b29560888e10ad0261d259baf995e43 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Sun, 23 Nov 2025 16:01:26 +0300 Subject: [PATCH] release version 2.0.54 --- framework/BaseYii.php | 2 +- framework/CHANGELOG.md | 76 +++++++++++------------ framework/helpers/mimeExtensions.php | 4 ++ framework/helpers/mimeTypes.php | 2 + framework/validators/CompareValidator.php | 2 +- 5 files changed, 46 insertions(+), 40 deletions(-) diff --git a/framework/BaseYii.php b/framework/BaseYii.php index 889874b301..e185a1215b 100644 --- a/framework/BaseYii.php +++ b/framework/BaseYii.php @@ -99,7 +99,7 @@ class BaseYii */ public static function getVersion() { - return '2.0.54-dev'; + return '2.0.54'; } /** diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 4a1f9c27b6..45dae0233e 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -1,89 +1,89 @@ Yii Framework 2 Change Log ========================== -2.0.54 under development +2.0.54 November 23, 2025 ------------------------ -- Bug #20542: Fix `Formatter` working with more complex ICU unit data structure (OndrejVasicek) -- Bug #20483: Fix `CompositeAuth` making bad assumptions on `AuthInterface` implementations (sammousa) +- Bug #19506: Fix `@property` annotations in `yii\console\widgets\Table`, `yii\di\Container` and `yii\web\Session` (mspirkov) +- Bug #19655: Fix `LinkPager::getPageRange` when `maxButtons` is 2 (mspirkov) - Bug #20432: Fix PHPStan/Psalm annotations for `ActiveQuery::asArray` (mspirkov) - Bug #20437: Fix PHPStan/Psalm annotations for `BaseArrayHelper::merge` (mspirkov) -- Enh #20434: Add PHPStan/Psalm annotations for `hasMany` and `hasOne` methods (mspirkov) -- Enh #20433: Add PHPStan/Psalm annotations for some controllers methods: `beforeAction`, `afterAction` and `bindActionParams` (mspirkov) -- Enh #20442: Add PHPStan/Psalm annotations for `yii\base\Controller` methods: `runAction`, `run`, `render`, `renderPartial` and `renderFile` (mspirkov) +- Bug #20447: Fix behavior for `yii\web\Controller::bindActionParams` around `mixed` type (chriscpty) - Bug #20453: Fix PHPStan/Psalm types in `yii\web\View` (mspirkov) -- Enh #20461: Add PHPStan/Psalm annotations for `yii\filters\auth\AuthInterface` (mspirkov) - Bug #20459: Fix return type in `RequestParserInterface::parse` (mspirkov) - Bug #20475: Fix `Formatter` class `asScientific()` method for PHP `8.5` `sprintf` precision change (`6` to `0`) (terabytesoftw) -- Bug #20482: Fix deprecation of `ReflectionMethod::setAccessible()` in PHP `8.5` (terabytesoftw) -- Enh #20480: Add PHPStan/Psalm annotations for `ServiceLocator::get` (mspirkov) -- Bug #20447: Fix behavior for `yii\web\Controller::bindActionParams` around `mixed` type (chriscpty) - Bug #20479: Fix issue with MSSQL related to char and nchar (craiglondon) -- Bug #20492: Fix deprecation of `finfo_close()` in PHP `8.5` by conditionally closing the resource (terabytesoftw) -- Bug #20495: Fix behavior when resetting sequence in `QueryBuilder` for `MSSQL` (achretien) -- Bug #20489: Replace deprecated `strftime` with `date` in `YiiRequirementChecker` (mspirkov) -- Bug #20494: Fix `PHPdoc`, add `PHPStan/Psalm` annotations for `authMethods` property in `CompositeAuth` class (terabytesoftw) +- Bug #20482: Fix deprecation of `ReflectionMethod::setAccessible()` in PHP `8.5` (terabytesoftw) +- Bug #20483: Fix `CompositeAuth` making bad assumptions on `AuthInterface` implementations (sammousa) - Bug #20485: Fix error `Cannot unset string offsets` in `yii\di\Instance:ensure(['__class' => ...], 'some\class\name')` (mspirkov) -- Enh #20047: Throw exception when fixture not found rather than ignoring (borgou) -- Enh #20505: `ArrayDataProvider` key handling with flexible path support (fetus-hina) +- Bug #20489: Replace deprecated `strftime` with `date` in `YiiRequirementChecker` (mspirkov) +- Bug #20492: Fix deprecation of `finfo_close()` in PHP `8.5` by conditionally closing the resource (terabytesoftw) +- Bug #20494: Fix `PHPdoc`, add `PHPStan/Psalm` annotations for `authMethods` property in `CompositeAuth` class (terabytesoftw) +- Bug #20495: Fix behavior when resetting sequence in `QueryBuilder` for `MSSQL` (achretien) - Bug #20508: Fix PHPDoc, add PHPStan/Psalm annotations for `yii\web\CookieCollection::getIterator`. Add missing `@property` annotation in `yii\base\Model` (mspirkov) - Bug #20513: Fix code examples in PHPDoc (mspirkov) -- Enh #20514: Add `@property` annotations for `yii\console\Controller` (mspirkov) - Bug #20515: Fix `@param` annotations in `BetweenColumnsCondition`, `InCondition` and `LikeCondition` (mspirkov) - Bug #20516: Fix `@template` annotations in `ActiveRecord` (mspirkov) -- Bug #19506: Fix `@property` annotations in `yii\console\widgets\Table`, `yii\di\Container` and `yii\web\Session` (mspirkov) -- Enh #20525, #20529, #20629: Add `@template` annotations for all actions (mspirkov) - Bug #20524: Fix PHPStan/Psalm annotations in `Yii::createObject` (mspirkov) - Bug #20530: Fix notice "Object of class DateTimeImmutable could not be converted to int" in `CookieCollection::has` (mspirkov) - Bug #20532: Add missing `return` statements in `CacheController::actionFlushSchema`, `FixtureController::actionUnload`, `HelpController::actionIndex` and `ServeController::actionIndex` (mspirkov) -- Bug #19655: Fix `LinkPager::getPageRange` when `maxButtons` is 2 (mspirkov) -- Enh #20539: Update minimum PHP version requirement from `7.3` to `7.4` (terabytesoftw) - Bug #20541: Remove deprecated caching components: `XCache` and `ZendDataCache`, and update related tests and documentation (terabytesoftw) +- Bug #20542: Fix `Formatter` working with more complex ICU unit data structure (OndrejVasicek) - Bug #20548: Fix PHP `8.5` `null` array offset deprecation warnings (terabytesoftw) -- New #19526: Add the `convertIniSizeToBytes` method to `BaseStringHelper` (mspirkov) +- Bug #20569: Fix `@param` annotation for `$default` in `HeaderCollection::get` (mspirkov) - Bug #20570: Fix `@var` annotation for `UrlManager::$cache` (mspirkov) - Bug #20571: Fix `@var` annotation for `yii\web\Response::$stream` (mspirkov) -- Bug #20569: Fix `@param` annotation for `$default` in `HeaderCollection::get` (mspirkov) - Bug #20576: Fix `@var` annotation for `StringValidator::$length` (mspirkov) -- Enh #20579: Add PHPStan/Psalm annotations for `HeaderCollection::get` (mspirkov) - Bug #20583: Fix return value in `Request::getServerPort` (mspirkov) - Bug #20585: Fix `@return` annotation for `CompositeUrlRule::createRules()` (mspirkov) - Bug #20587: Fix `@var` annotation for `yii\rbac\Item::$ruleName` (mspirkov) - Bug #20589: Fix `@var` annotations for `yii\rbac\DbManager` properties (mspirkov) -- Bug #20599: Fix `@return` annotation for `ConditionInterface::fromArrayDefinition()` (mspirkov) -- Enh #20591: Add PHPStan/Psalm annotations for `yii\rbac\BaseManager::getItems()` (mspirkov) - Bug #20594: Fix `@return` annotation for `Instance::get()` (mspirkov) - Bug #20595: Fix `@return` annotation for `BaseHtml::getAttributeValue()` (mspirkov) -- Bug #20605: Fix return value in `SerialColumn::renderDataCellContent()` (mspirkov) -- Bug #20604: Fix `@var` annotation for `yii\db\Command::$pdoStatement` (mspirkov) +- Bug #20599: Fix `@return` annotation for `ConditionInterface::fromArrayDefinition()` (mspirkov) - Bug #20600: Fix `@var` annotation for `yii\test\FileFixtureTrait::$dataFile` (mspirkov) -- Enh #20607: Add PHPStan/Psalm annotations for DB schemas (mspirkov) +- Bug #20604: Fix `@var` annotation for `yii\db\Command::$pdoStatement` (mspirkov) +- Bug #20605: Fix return value in `SerialColumn::renderDataCellContent()` (mspirkov) - Bug #20608: Fix `@return` annotations for `yii\rest\Serializer` methods (mspirkov) - Bug #20610: Fix `@var` annotation for `ActiveQueryTrait::$with` (mspirkov) - Bug #20611: Fix `@return` annotations for `yii\i18n\GettextMoFile` methods (mspirkov) -- Bug #20620: Fix `@var` annotation for `RateLimiter::$user` (mspirkov) -- Bug #20619: Fix `@return` annotation for `yii\db\Query::prepare()` (mspirkov) -- Bug #20618: Fix `@var` annotation for `yii\web\Response::$acceptMimeType` (mspirkov) - Bug #20617: Fix `@return` annotation for `DataColumn::getDataCellValue()` (mspirkov) +- Bug #20618: Fix `@var` annotation for `yii\web\Response::$acceptMimeType` (mspirkov) +- Bug #20619: Fix `@return` annotation for `yii\db\Query::prepare()` (mspirkov) +- Bug #20620: Fix `@var` annotation for `RateLimiter::$user` (mspirkov) - Bug #20628: Fix `@return` annotations for `lastInsertId` methods in `yii\db\mssql` namespace (mspirkov) - Bug #20630: Fix `@var` annotations for `yii\web\CompositeUrlRule::$rules` and `yii\web\GroupUrlRule::$rules` (mspirkov) - Bug #20634: Fix PHPDoc annotations in `yii\db` namespace. Add PHPStan/Psalm annotations for `yii\db\SqlTokenizer::startsWithAnyLongest()` (mspirkov) - Bug #20636: Fix `@param` annotations for `$message` in logging methods (mspirkov) - Bug #20637: Fix PHPDoc annotations in `ActiveRelationTrait`. Add PHPStan/Psalm annotations for `$modelClass` in `ActiveQuery`, `ActiveQueryTrait` and `ActiveRelationTrait` (mspirkov) - Bug #20639: Add missing generics in `yii\web` namespace (mspirkov) -- Bug #20645: Add missing generics in `yii\helpers` and `yii\test` namespaces. Fix PHPDoc annotations in `ArrayAccessTrait` (mspirkov) - Bug #20640: Fix `@param` annotation for `$block` in `yii\console\Markdown::renderParagraph()` (mspirkov) -- Enh #20642: Pass `$model` and `$attribute` in Compare Validator's compareValue property closure (samuelrajan747) -- Enh #20650: Add PHPStan/Psalm annotations for `yii\di\Container` (mspirkov) -- Bug #20654: Add missing generics in `yii\db` namespace. Fix PHPDoc annotations in `yii\db\ArrayExpression` (mspirkov) +- Bug #20645: Add missing generics in `yii\helpers` and `yii\test` namespaces. Fix PHPDoc annotations in `ArrayAccessTrait` (mspirkov) - Bug #20651: Add missing generics in `yii\filters` namespace (mspirkov) +- Bug #20654: Add missing generics in `yii\db` namespace. Fix PHPDoc annotations in `yii\db\ArrayExpression` (mspirkov) +- Bug #20658: Add missing generics in `yii\console`, `yii\captcha`, `yii\caching` and `yii\behaviors` namespaces (mspirkov) - Bug #20659: Fix PHP `8.5` `null` array offset deprecation warnings in `MariaDB` driver (terabytesoftw) - Bug #20665: Fix PHP `8.5` `null` array offset deprecation warnings in `yii\build\controllers\ReleaseController` class (terabytesoftw) -- Bug #20658: Add missing generics in `yii\console`, `yii\captcha`, `yii\caching` and `yii\behaviors` namespaces (mspirkov) - Bug #20666: Add missing generics in `yii\base`, `yii\console`, `yii\filters` and `yii\web` namespaces (mspirkov) -- Bug #20673: Sanitize `null` bytes before `quoteValue()` on PHP 8.5+ in SQLite (terabytesoftw) - Bug #20671: Fix PHPDoc annotations in `yii\base`, `yii\console`, `yii\web` and `yii\widgets` namespaces (mspirkov) +- Bug #20673: Sanitize `null` bytes before `quoteValue()` on PHP 8.5+ in SQLite (terabytesoftw) - Bug #20675: Add generics for all controllers (mspirkov) +- Enh #20047: Throw exception when fixture not found rather than ignoring (borgou) +- Enh #20433: Add PHPStan/Psalm annotations for some controllers methods: `beforeAction`, `afterAction` and `bindActionParams` (mspirkov) +- Enh #20434: Add PHPStan/Psalm annotations for `hasMany` and `hasOne` methods (mspirkov) +- Enh #20442: Add PHPStan/Psalm annotations for `yii\base\Controller` methods: `runAction`, `run`, `render`, `renderPartial` and `renderFile` (mspirkov) +- Enh #20461: Add PHPStan/Psalm annotations for `yii\filters\auth\AuthInterface` (mspirkov) +- Enh #20480: Add PHPStan/Psalm annotations for `ServiceLocator::get` (mspirkov) +- Enh #20505: `ArrayDataProvider` key handling with flexible path support (fetus-hina) +- Enh #20514: Add `@property` annotations for `yii\console\Controller` (mspirkov) +- Enh #20525, #20529, #20629: Add `@template` annotations for all actions (mspirkov) +- Enh #20539: Update minimum PHP version requirement from `7.3` to `7.4` (terabytesoftw) +- Enh #20579: Add PHPStan/Psalm annotations for `HeaderCollection::get` (mspirkov) +- Enh #20591: Add PHPStan/Psalm annotations for `yii\rbac\BaseManager::getItems()` (mspirkov) +- Enh #20607: Add PHPStan/Psalm annotations for DB schemas (mspirkov) +- Enh #20642: Pass `$model` and `$attribute` in Compare Validator's compareValue property closure (samuelrajan747) +- Enh #20650: Add PHPStan/Psalm annotations for `yii\di\Container` (mspirkov) +- New #19526: Add the `convertIniSizeToBytes` method to `BaseStringHelper` (mspirkov) 2.0.53 June 27, 2025 diff --git a/framework/helpers/mimeExtensions.php b/framework/helpers/mimeExtensions.php index 115b340758..e54b90e4d0 100644 --- a/framework/helpers/mimeExtensions.php +++ b/framework/helpers/mimeExtensions.php @@ -575,6 +575,10 @@ return [ ], 'application/vnd.spotfire.dxp' => 'dxp', 'application/vnd.spotfire.sfs' => 'sfs', + 'application/vnd.sqlite3' => [ + 'sqlite', + 'sqlite3', + ], 'application/vnd.stardivision.calc' => 'sdc', 'application/vnd.stardivision.draw' => 'sda', 'application/vnd.stardivision.impress' => 'sdd', diff --git a/framework/helpers/mimeTypes.php b/framework/helpers/mimeTypes.php index 9f45b1195b..be5645f34b 100644 --- a/framework/helpers/mimeTypes.php +++ b/framework/helpers/mimeTypes.php @@ -759,6 +759,8 @@ $mimeTypes = [ 'spq' => 'application/scvp-vp-request', 'spx' => 'audio/ogg', 'sql' => 'application/x-sql', + 'sqlite' => 'application/vnd.sqlite3', + 'sqlite3' => 'application/vnd.sqlite3', 'src' => 'application/x-wais-source', 'srt' => 'application/x-subrip', 'sru' => 'application/sru+xml', diff --git a/framework/validators/CompareValidator.php b/framework/validators/CompareValidator.php index ce016793c4..5120c74b9f 100644 --- a/framework/validators/CompareValidator.php +++ b/framework/validators/CompareValidator.php @@ -57,7 +57,7 @@ class CompareValidator extends Validator */ public $compareAttribute; /** - * @var mixed the constant value to be compared with or an anonymous function + * @var mixed the constant value to be compared with or an anonymous function * that returns the constant value. When both this property and * [[compareAttribute]] are set, this property takes precedence. * The signature of the anonymous function should be as follows,