{"record":{"id":"f32db0a04285cadd","repo":"phacility/phabricator","slug":"configuration-is-not-valid-maniphest-points-confi","errorCode":null,"errorMessage":"Configuration is not valid. Maniphest points configuration must be a dictionary.","messagePattern":"Configuration is not valid\\. Maniphest points configuration must be a dictionary\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/maniphest/constants/ManiphestTaskPoints.php","lineNumber":26,"sourceCode":"  }\n\n  public static function getPointsLabel() {\n    $config = self::getPointsConfig();\n    return idx($config, 'label', pht('Points'));\n  }\n\n  public static function getPointsActionLabel() {\n    $config = self::getPointsConfig();\n    return idx($config, 'action', pht('Change Points'));\n  }\n\n  private static function getPointsConfig() {\n    return PhabricatorEnv::getEnvConfig('maniphest.points');\n  }\n\n  public static function validateConfiguration($config) {\n    if (!is_array($config)) {\n      throw new Exception(\n        pht(\n          'Configuration is not valid. Maniphest points configuration must '.\n          'be a dictionary.'));\n    }\n\n    PhutilTypeSpec::checkMap(\n      $config,\n      array(\n        'enabled' => 'optional bool',\n        'label' => 'optional string',\n        'action' => 'optional string',\n      ));\n  }\n\n}\n","sourceCodeStart":8,"sourceCodeEnd":42,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/maniphest/constants/ManiphestTaskPoints.php#L8-L42","documentation":"ManiphestTaskPoints::validateConfiguration rejects the 'maniphest.points' config when it is not a PHP array/dict. Beyond this check, PhutilTypeSpec::checkMap only allows the keys 'enabled' (bool), 'label' (string) and 'action' (string), so a scalar or list value fails at the very first gate with this Exception.","triggerScenarios":"Setting maniphest.points to a scalar via bin/config (e.g. `bin/config set maniphest.points true` or a JSON string that decodes to a non-map such as '[1,2]'). The validation callback runs during the config write and throws before the value is stored.","commonSituations":"Admins enabling story points quickly from the CLI assume a boolean flag ('maniphest.points true') instead of a dict. Others paste a YAML/JSON fragment where the top level is a list or a quoted string, or a trailing comma turns the JSON into something that decodes to a scalar.","solutions":["Set a dict: `bin/config set maniphest.points '{\"enabled\": true}'`.","Optionally customize labels with the allowed keys only: {\"enabled\": true, \"label\": \"Points\", \"action\": \"Change Points\"}.","Prefer the web Config application (maniphest.points), whose form fields produce a well-formed dict and surface validation errors inline."],"exampleFix":"# before\n$ ./bin/config set maniphest.points true\n\n# after\n$ ./bin/config set maniphest.points '{\"enabled\": true}'","handlingStrategy":"validation","validationCode":"function is_valid_points_config($config) {\n  if (!is_array($config)) return false;\n  foreach ($config as $k => $v) {\n    if (!in_array($k, array('enabled', 'label', 'action'), true)) return false;\n  }\n  if (isset($config['enabled']) && !is_bool($config['enabled'])) return false;\n  if (isset($config['label']) && !is_string($config['label'])) return false;\n  if (isset($config['action']) && !is_string($config['action'])) return false;\n  return true;\n}","typeGuard":"function is_points_config($c) { return is_array($c); }","tryCatchPattern":null,"preventionTips":["Always write maniphest.points as a JSON object, never a bare scalar.","Apply config on a test instance (or via the web Config UI) before production.","Keep only the three documented keys: enabled, label, action."],"tags":["phabricator","maniphest","configuration","points","type-validation"],"backgroundTag":"config-schema-validation","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}