{"record":{"id":"fcae6e55ec6da250","repo":"yiisoft/yii2","slug":"could-not-load-required-service-name-fcae6e","errorCode":null,"errorMessage":"Could not load required service: {name}","messagePattern":"Could not load required service: (.+?)","errorType":"console","errorClass":"yii\\console\\Exception","httpStatus":null,"severity":"error","filePath":"framework/console/Controller.php","lineNumber":257,"sourceCode":"                    } else {\n                        $isArray = $param->isArray();\n                    }\n                    if ($isArray) {\n                        $params[$key] = $params[$key] === '' ? [] : preg_split('/\\s*,\\s*/', $params[$key]);\n                    }\n                    $args[] = $actionParams[$key] = $params[$key];\n                    unset($params[$key]);\n                }\n            } elseif (\n                PHP_VERSION_ID >= 70100\n                && ($type = $param->getType()) !== null\n                && $type instanceof \\ReflectionNamedType\n                && !$type->isBuiltin()\n            ) {\n                try {\n                    $this->bindInjectedParams($type, $name, $args, $requestedParams);\n                } catch (\\yii\\base\\Exception $e) {\n                    throw new Exception($e->getMessage());\n                }\n            } elseif ($param->isDefaultValueAvailable()) {\n                $args[] = $actionParams[$i] = $param->getDefaultValue();\n            } else {\n                $missing[] = $name;\n            }\n        }\n\n        if (!empty($missing)) {\n            throw new Exception(Yii::t('yii', 'Missing required arguments: {params}', ['params' => implode(', ', $missing)]));\n        }\n\n        // We use a different array here, specifically one that doesn't contain service instances but descriptions instead.\n        if (\\Yii::$app->requestedParams === null) {\n            \\Yii::$app->requestedParams = array_merge($actionParams, $requestedParams);\n        }\n\n        return array_merge($args, $params);","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/yiisoft/yii2/blob/66f00d18a29b520f85e8e8f1e32d1e7e7b556cac/framework/console/Controller.php#L239-L275","documentation":"Error \"Could not load required service: {name}\" thrown in yiisoft/yii2.","triggerScenarios":"Thrown at framework/console/Controller.php:257 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"66f00d18a29b520f85e8e8f1e32d1e7e7b556cac","analyzedAt":"2026-08-17T05:17:23.470Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}