From e53622d6d346fcd5fdcd751b7b4899fe63f86a4e Mon Sep 17 00:00:00 2001 From: Maksim Spirkov <63721828+mspirkov@users.noreply.github.com> Date: Mon, 13 Oct 2025 10:01:02 +0300 Subject: [PATCH] Fix #20594: Fix `@return` annotation for `Instance::get()` --- framework/CHANGELOG.md | 1 + framework/di/Instance.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index de641fba6a..e373c443f7 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -49,6 +49,7 @@ Yii Framework 2 Change Log - Bug #20583: Fix return value in `Request::getServerPort` (mspirkov) - Bug #20587: Fix `@var` annotation for `yii\rbac\Item::$ruleName` (mspirkov) - Bug #20589: Fix `@var` annotations for `yii\rbac\DbManager` properties (mspirkov) +- Bug #20594: Fix `@return` annotation for `Instance::get()` (mspirkov) - Bug #20595: Fix `@return` annotation for `BaseHtml::getAttributeValue()` (mspirkov) diff --git a/framework/di/Instance.php b/framework/di/Instance.php index 8e7597a405..e5fa1c6441 100644 --- a/framework/di/Instance.php +++ b/framework/di/Instance.php @@ -173,7 +173,7 @@ class Instance * Returns the actual object referenced by this Instance object. * @param ServiceLocator|Container|null $container the container used to locate the referenced object. * If null, the method will first try `Yii::$app` then `Yii::$container`. - * @return object the actual object referenced by this Instance object. + * @return object|null the actual object referenced by this Instance object. */ public function get($container = null) {