Fix #20658: Add missing generics in yii\console, yii\captcha, yii\caching and yii\behaviors namespaces

This commit is contained in:
Maksim Spirkov
2025-10-30 23:41:32 +03:00
committed by GitHub
parent 2ee2da1ad6
commit ffa0dda204
16 changed files with 78 additions and 25 deletions

View File

@@ -8,6 +8,7 @@
namespace yii\console\controllers;
use Yii;
use yii\base\Action;
use yii\base\BaseObject;
use yii\base\InvalidConfigException;
use yii\base\NotSupportedException;
@@ -122,9 +123,12 @@ abstract class BaseMigrateController extends Controller
/**
* This method is invoked right before an action is to be executed (after all possible filters.)
* It checks the existence of the [[migrationPath]].
* @param \yii\base\Action $action the action to be executed.
* @param Action $action the action to be executed.
* @throws InvalidConfigException if directory specified in migrationPath doesn't exist and action isn't "create".
* @return bool whether the action should continue to be executed.
*
* @phpstan-param Action<static> $action
* @psalm-param Action<static> $action
*/
public function beforeAction($action)
{

View File

@@ -8,6 +8,7 @@
namespace yii\console\controllers;
use Yii;
use yii\base\Action;
use yii\db\Connection;
use yii\db\Query;
use yii\di\Instance;
@@ -174,8 +175,11 @@ class MigrateController extends BaseMigrateController
/**
* This method is invoked right before an action is to be executed (after all possible filters.)
* It checks the existence of the [[migrationPath]].
* @param \yii\base\Action $action the action to be executed.
* @param Action $action the action to be executed.
* @return bool whether the action should continue to be executed.
*
* @phpstan-param Action<static> $action
* @psalm-param Action<static> $action
*/
public function beforeAction($action)
{