From 6ee5d952aed067fd8b99aa3ccf095faf8fe4d4c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=BF=D0=B8?= =?UTF-8?q?=D1=80=D0=BA=D0=BE=D0=B2?= <63721828+max-s-lab@users.noreply.github.com> Date: Tue, 15 Jul 2025 12:54:19 +0500 Subject: [PATCH] Fix #20453: Fix PHPStan/Psalm types in `yii\web\View` --- framework/CHANGELOG.md | 1 + framework/web/View.php | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 5f342d71ef..af77200ef8 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -9,6 +9,7 @@ Yii Framework 2 Change Log - Enh #20434: Added PHPStan/Psalm annotations for `hasMany` and `hasOne` methods (max-s-lab) - Enh #20433: Added PHPStan/Psalm annotations for some controllers methods: `beforeAction`, `afterAction` and `bindActionParams` (max-s-lab) - Enh #20442: Add PHPStan/Psalm annotations for `yii\base\Controller` methods: `runAction`, `run`, `render`, `renderPartial` and `renderFile` (max-s-lab) +- Bug #20453: Fix PHPStan/Psalm types in `yii\web\View` (max-s-lab) 2.0.53 June 27, 2025 diff --git a/framework/web/View.php b/framework/web/View.php index 335a14086e..71a9d495d7 100644 --- a/framework/web/View.php +++ b/framework/web/View.php @@ -45,23 +45,27 @@ use yii\helpers\Url; * @phpstan-type RegisterJsFileOptions array{ * depends?: class-string[], * position?: int, - * appendTimestamp?: boolean + * appendTimestamp?: bool, + * ... * } * * @psalm-type RegisterJsFileOptions = array{ * depends?: class-string[], * position?: int, - * appendTimestamp?: boolean + * appendTimestamp?: bool, + * ... * } * * @phpstan-type RegisterCssFileOptions array{ * depends?: class-string[], - * appendTimestamp?: boolean + * appendTimestamp?: bool, + * ... * } * * @psalm-type RegisterCssFileOptions = array{ * depends?: class-string[], - * appendTimestamp?: boolean + * appendTimestamp?: bool, + * ... * } */ class View extends \yii\base\View