Skip to content

Commit a2259d0

Browse files
authored
Fix #20373: Fixed the type of the first parameter yii\base\Controller::bindInjectedParams()
1 parent f66ee97 commit a2259d0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

framework/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Yii Framework 2 Change Log
1414
- Enh #20361: Add PHPStan/Psalm annotations for `ActiveQuery` (max-s-lab)
1515
- Enh #20363: Add PHPStan/Psalm annotations for `ActiveRecord` and `ActiveQuery` (max-s-lab)
1616
- Enh #20372: Add PHPStan/Psalm annotations for `AssetBundle`, `AssetManager` and `View` (max-s-lab)
17+
- Bug #20373: Fixed the type of the first parameter `yii\base\Controller::bindInjectedParams()` (max-s-lab)
1718
- Enh #20374: Add PHPStan/Psalm annotations for `BaseYii`, `BaseObject`, `Component`, `Model`, `Module` and `yii\base\Controller` (max-s-lab)
1819

1920

framework/base/Controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ public function findLayoutFile($view)
554554

555555
/**
556556
* Fills parameters based on types and names in action method signature.
557-
* @param \ReflectionType $type The reflected type of the action parameter.
557+
* @param \ReflectionNamedType $type The reflected type of the action parameter.
558558
* @param string $name The name of the parameter.
559559
* @param array &$args The array of arguments for the action, this function may append items to it.
560560
* @param array &$requestedParams The array with requested params, this function may write specific keys to it.
@@ -564,7 +564,7 @@ public function findLayoutFile($view)
564564
* (for example an interface type hint) without a proper definition in the container.
565565
* @since 2.0.36
566566
*/
567-
final protected function bindInjectedParams(\ReflectionType $type, $name, &$args, &$requestedParams)
567+
final protected function bindInjectedParams(\ReflectionNamedType $type, $name, &$args, &$requestedParams)
568568
{
569569
// Since it is not a builtin type it must be DI injection.
570570
$typeName = $type->getName();

0 commit comments

Comments
 (0)