{"record":{"id":"671294cf5c88f4c1","repo":"yiisoft/yii2","slug":"parameter-name-is-not-valid","errorCode":null,"errorMessage":"Parameter \"$name\" is not valid","messagePattern":"Parameter \"\\$name\" is not valid","errorType":"console","errorClass":"yii\\console\\Exception","httpStatus":null,"severity":"error","filePath":"framework/console/Request.php","lineNumber":84,"sourceCode":"            if ($route === '--') {\n                $endOfOptionsFound = true;\n                $route = (string)array_shift($rawParams);\n            }\n        } else {\n            $route = '';\n        }\n\n        $params = [];\n        $prevOption = null;\n        foreach ($rawParams as $param) {\n            if ($endOfOptionsFound) {\n                $params[] = $param;\n            } elseif ($param === '--') {\n                $endOfOptionsFound = true;\n            } elseif (preg_match('/^--([\\w-]+)(?:=(.*))?$/', $param, $matches)) {\n                $name = $matches[1];\n                if (is_numeric(substr($name, 0, 1))) {\n                    throw new Exception('Parameter \"' . $name . '\" is not valid');\n                }\n\n                if ($name !== Application::OPTION_APPCONFIG) {\n                    $params[$name] = isset($matches[2]) ? $matches[2] : true;\n                    $prevOption = &$params[$name];\n                }\n            } elseif (preg_match('/^-([\\w-]+)(?:=(.*))?$/', $param, $matches)) {\n                $name = $matches[1];\n                if (is_numeric($name)) {\n                    $params[] = $param;\n                } else {\n                    $params['_aliases'][$name] = isset($matches[2]) ? $matches[2] : true;\n                    $prevOption = &$params['_aliases'][$name];\n                }\n            } elseif ($prevOption === true) {\n                // `--option value` syntax\n                $prevOption = $param;\n            } else {","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/yiisoft/yii2/blob/66f00d18a29b520f85e8e8f1e32d1e7e7b556cac/framework/console/Request.php#L66-L102","documentation":"Error \"Parameter \"$name\" is not valid\" thrown in yiisoft/yii2.","triggerScenarios":"Thrown at framework/console/Request.php:84 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"}