diff --git a/framework/BaseYii.php b/framework/BaseYii.php index 68ed62abc4..cb7ac56e8e 100644 --- a/framework/BaseYii.php +++ b/framework/BaseYii.php @@ -343,8 +343,8 @@ class BaseYii * @see \yii\di\Container * * @template T - * @phpstan-param class-string|array{class: class-string, ...}|callable(): T $type - * @psalm-param class-string|array{class: class-string, ...}|callable(): T $type + * @phpstan-param class-string|array{class?: class-string, __class?: class-string, ...}|callable(): T $type + * @psalm-param class-string|array{class?: class-string, __class?: class-string, ...}|callable(): T $type * @phpstan-return T * @psalm-return T */ diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 75e8e3fdbb..3ed08d9382 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -28,6 +28,7 @@ Yii Framework 2 Change Log - Enh #20514: Add `@property` annotations for `yii\console\Controller` (max-s-lab) - Bug #20515: Fix `@param` annotations in `BetweenColumnsCondition`, `InCondition` and `LikeCondition` (max-s-lab) - Bug #20516: Fix `@template` annotations in `ActiveRecord` (max-s-lab) +- Bug #20524: Fix PHPStan/Psalm annotations in `Yii::createObject` (max-s-lab) 2.0.53 June 27, 2025