From 5681a98bbbf42bc57b66ebb53c63f763eb95ffce Mon Sep 17 00:00:00 2001 From: Maksim Spirkov <63721828+mspirkov@users.noreply.github.com> Date: Mon, 20 Oct 2025 15:02:49 +0300 Subject: [PATCH] Fix #20630: Fix `@var` annotations for `yii\web\CompositeUrlRule::$rules` and `yii\web\GroupUrlRule::$rules` --- framework/CHANGELOG.md | 1 + framework/web/CompositeUrlRule.php | 2 +- framework/web/GroupUrlRule.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 77b64b6034..31c85678a9 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -65,6 +65,7 @@ Yii Framework 2 Change Log - 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 #20630: Fix `@var` annotations for `yii\web\CompositeUrlRule::$rules` and `yii\web\GroupUrlRule::$rules` (mspirkov) 2.0.53 June 27, 2025 diff --git a/framework/web/CompositeUrlRule.php b/framework/web/CompositeUrlRule.php index f52f871868..8b085db104 100644 --- a/framework/web/CompositeUrlRule.php +++ b/framework/web/CompositeUrlRule.php @@ -22,7 +22,7 @@ use yii\base\BaseObject; abstract class CompositeUrlRule extends BaseObject implements UrlRuleInterface { /** - * @var UrlRuleInterface[] the URL rules contained in this composite rule. + * @var UrlRuleInterface[]|UrlRuleInterface[][]|array[]|string[] the URL rules contained in this composite rule. * This property is set in [[init()]] by the return value of [[createRules()]]. */ protected $rules = []; diff --git a/framework/web/GroupUrlRule.php b/framework/web/GroupUrlRule.php index f8a1192434..cd0ce4bdc2 100644 --- a/framework/web/GroupUrlRule.php +++ b/framework/web/GroupUrlRule.php @@ -48,7 +48,7 @@ use yii\base\InvalidConfigException; class GroupUrlRule extends CompositeUrlRule { /** - * @var array the rules contained within this composite rule. Please refer to [[UrlManager::rules]] + * @var UrlRuleInterface[]|array[]|string[] the rules contained within this composite rule. Please refer to [[UrlManager::rules]] * for the format of this property. * @see prefix * @see routePrefix