From 04d0c0dd5fc5a50679185d30435b15a4468eff45 Mon Sep 17 00:00:00 2001 From: Maksim Spirkov <63721828+max-s-lab@users.noreply.github.com> Date: Mon, 8 Sep 2025 15:08:02 +0500 Subject: [PATCH] Fix #20516: Fix `@template` annotations in `ActiveRecord` --- framework/CHANGELOG.md | 1 + framework/db/ActiveRecord.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 64f8f657fb..722531ed0a 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -26,6 +26,7 @@ Yii Framework 2 Change Log - Bug #20508: Fix PHPDoc, add PHPStan/Psalm annotations for `yii\web\CookieCollection::getIterator`. Add missing `@property` annotation in `yii\base\Model` (max-s-lab) - Bug #20513: Fix code examples in PHPDoc (max-s-lab) - Enh #20514: Add `@property` annotations for `yii\console\Controller` (max-s-lab) +- Bug #20516: Fix `@template` annotations in `ActiveRecord` (max-s-lab) 2.0.53 June 27, 2025 diff --git a/framework/db/ActiveRecord.php b/framework/db/ActiveRecord.php index 5645298afd..16499e0e95 100644 --- a/framework/db/ActiveRecord.php +++ b/framework/db/ActiveRecord.php @@ -597,7 +597,7 @@ class ActiveRecord extends BaseActiveRecord * * @return ActiveQuery * - * @template T + * @template T of self * * @phpstan-param class-string $class * @psalm-param class-string $class @@ -615,7 +615,7 @@ class ActiveRecord extends BaseActiveRecord * * @return ActiveQuery * - * @template T + * @template T of self * * @phpstan-param class-string $class * @psalm-param class-string $class