yiisoft/yii2 · error · yii\console\Exception
Missing required arguments: {params}
Error message
Missing required arguments: {params} What it means
Error "Missing required arguments: {params}" thrown in yiisoft/yii2.
Source
Thrown at framework/console/Controller.php:267
PHP_VERSION_ID >= 70100
&& ($type = $param->getType()) !== null
&& $type instanceof \ReflectionNamedType
&& !$type->isBuiltin()
) {
try {
$this->bindInjectedParams($type, $name, $args, $requestedParams);
} catch (\yii\base\Exception $e) {
throw new Exception($e->getMessage());
}
} elseif ($param->isDefaultValueAvailable()) {
$args[] = $actionParams[$i] = $param->getDefaultValue();
} else {
$missing[] = $name;
}
}
if (!empty($missing)) {
throw new Exception(Yii::t('yii', 'Missing required arguments: {params}', ['params' => implode(', ', $missing)]));
}
// We use a different array here, specifically one that doesn't contain service instances but descriptions instead.
if (\Yii::$app->requestedParams === null) {
\Yii::$app->requestedParams = array_merge($actionParams, $requestedParams);
}
return array_merge($args, $params);
}
/**
* Formats a string with ANSI codes.
*
* You may pass additional parameters using the constants defined in [[\yii\helpers\Console]].
*
* Example:
*
* ```View on GitHub (pinned to 66f00d18a2)
When it happens
Trigger: Thrown at framework/console/Controller.php:267 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of yiisoft/yii2@66f00d18a2 (2026-08-17).
Data as JSON: /api/errors/c89061b3a0d86cdb.
Report an issue: GitHub.