diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 49f3105b333..95339288f96 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -14,6 +14,7 @@ Yii Framework 2 Change Log - Enh #20361: Add PHPStan/Psalm annotations for `ActiveQuery` (max-s-lab) - Enh #20363: Add PHPStan/Psalm annotations for `ActiveRecord` and `ActiveQuery` (max-s-lab) - Enh #20372: Add PHPStan/Psalm annotations for `AssetBundle`, `AssetManager` and `View` (max-s-lab) +- Bug #20373: Fixed the type of the first parameter `yii\base\Controller::bindInjectedParams()` (max-s-lab) - Enh #20374: Add PHPStan/Psalm annotations for `BaseYii`, `BaseObject`, `Component`, `Model`, `Module` and `yii\base\Controller` (max-s-lab) diff --git a/framework/base/Controller.php b/framework/base/Controller.php index f99d97fcf2d..494e1c535c8 100644 --- a/framework/base/Controller.php +++ b/framework/base/Controller.php @@ -554,7 +554,7 @@ public function findLayoutFile($view) /** * Fills parameters based on types and names in action method signature. - * @param \ReflectionType $type The reflected type of the action parameter. + * @param \ReflectionNamedType $type The reflected type of the action parameter. * @param string $name The name of the parameter. * @param array &$args The array of arguments for the action, this function may append items to it. * @param array &$requestedParams The array with requested params, this function may write specific keys to it. @@ -564,7 +564,7 @@ public function findLayoutFile($view) * (for example an interface type hint) without a proper definition in the container. * @since 2.0.36 */ - final protected function bindInjectedParams(\ReflectionType $type, $name, &$args, &$requestedParams) + final protected function bindInjectedParams(\ReflectionNamedType $type, $name, &$args, &$requestedParams) { // Since it is not a builtin type it must be DI injection. $typeName = $type->getName();