{"record":{"id":"e26684ae7c56c5d2","repo":"phacility/phabricator","slug":"argument-s-does-not-match-the-name-of-any-gener","errorCode":null,"errorMessage":"Argument \"%s\" does not match the name of any generators.","messagePattern":"Argument \"(.+?)\" does not match the name of any generators\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/lipsum/management/PhabricatorLipsumGenerateWorkflow.php","lineNumber":112,"sourceCode":"      } else {\n        $matches = array();\n        foreach ($all_generators as $generator) {\n          $name = phutil_utf8_strtolower($generator->getGeneratorKey());\n\n          // If there's an exact match, select just that generator.\n          if ($arg == $name) {\n            $matches = array($generator);\n            break;\n          }\n\n          // If there's a partial match, match that generator but continue.\n          if (strpos($name, $arg) !== false) {\n            $matches[] = $generator;\n          }\n        }\n\n        if (!$matches) {\n          throw new PhutilArgumentUsageException(\n            pht(\n              'Argument \"%s\" does not match the name of any generators.',\n              $arg_original));\n        }\n\n        if (count($matches) > 1) {\n          throw new PhutilArgumentUsageException(\n            pht(\n              'Argument \"%s\" is ambiguous, and matches multiple '.\n              'generators: %s.',\n              $arg_original,\n              implode(', ', mpull($matches, 'getGeneratorName'))));\n        }\n      }\n\n      foreach ($matches as $match) {\n        $generators[] = $match;\n      }","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/lipsum/management/PhabricatorLipsumGenerateWorkflow.php#L94-L130","documentation":"Each argument to 'bin/lipsum generate' is lowercased and matched against generator keys (e.g. 'users'): an exact key match selects that generator, otherwise substring matches are collected (PhabricatorLipsumGenerateWorkflow.php:90-108). This error means the argument matched no generator key even as a substring.","triggerScenarios":"Running './bin/lipsum generate taks' or any misspelled/invented name; keys changed between Phabricator versions so an old script's argument no longer matches.","commonSituations":"Guessing generator names instead of using keys; copy-pasting commands for a different version; trailing whitespace or shell quoting issues altering the argument.","solutions":["Use an exact generator key, e.g. './bin/lipsum generate users'.","Run './bin/lipsum generate all' to run every generator without naming one.","Discover keys from the generator classes (getGeneratorKey()) under src/applications/*/lipsum/."],"exampleFix":"// before\n./bin/lipsum generate usres\n// after\n./bin/lipsum generate users","handlingStrategy":"validation","validationCode":"// Resolve generator keys exactly as the workflow does:\n$all = id(new PhutilClassMapQuery())\n  ->setAncestorClass('PhabricatorTestDataGenerator')\n  ->setUniqueMethod('getGeneratorKey')\n  ->execute();\n$keys = array_map('strtolower', array_keys($all));\nif (!in_array(strtolower($arg), $keys, true)) {\n  throw new InvalidArgumentException(\n    'Unknown generator; valid keys: '.implode(', ', $keys));\n}","typeGuard":"function isLipsumGeneratorKey($arg) {\n  static $keys = null;\n  if ($keys === null) {\n    $keys = array_map('strtolower', array_keys(id(new PhutilClassMapQuery())\n      ->setAncestorClass('PhabricatorTestDataGenerator')\n      ->setUniqueMethod('getGeneratorKey')\n      ->execute()));\n  }\n  return in_array(strtolower($arg), $keys, true);\n}","tryCatchPattern":null,"preventionTips":["Use exact generator keys (e.g. 'users'), not guesses or display names.","Pin and re-verify keys after Phabricator upgrades; discover them from src/applications/*/lipsum classes."],"tags":["lipsum","phabricator","cli","argument-validation","generator"],"backgroundTag":"invalid-argument-value","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}