{"record":{"id":"2489752839b0e986","repo":"phacility/phabricator","slug":"icon-special-attribute-s-is-not-valid-recogniz","errorCode":null,"errorMessage":"Icon special attribute \"%s\" is not valid. Recognized special attributes are: %s.","messagePattern":"Icon special attribute \"(.+?)\" is not valid\\. Recognized special attributes are: (.+?)\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/project/icon/PhabricatorProjectIconSet.php","lineNumber":239,"sourceCode":"      if (!preg_match('/^[a-z]{1,32}\\z/', $value['key'])) {\n        throw new Exception(\n          pht(\n            'Icon key \"%s\" is not a valid icon key. Icon keys must be 1-32 '.\n            'characters long and contain only lowercase letters. For example, '.\n            '\"%s\" and \"%s\" are reasonable keys.',\n            $value['key'],\n            'tag',\n            'group'));\n      }\n\n      $special = idx($value, 'special');\n      $valid = array(\n        self::SPECIAL_MILESTONE => true,\n      );\n\n      if ($special !== null) {\n        if (empty($valid[$special])) {\n          throw new Exception(\n            pht(\n              'Icon special attribute \"%s\" is not valid. Recognized special '.\n              'attributes are: %s.',\n              $special,\n              implode(', ', array_keys($valid))));\n        }\n      }\n    }\n\n    $default = null;\n    $milestone = null;\n    $keys = array();\n    foreach ($config as $idx => $value) {\n      $key = $value['key'];\n      if (isset($keys[$key])) {\n        throw new Exception(\n          pht(\n            'Project icons must have unique keys, but two icons share the '.","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/project/icon/PhabricatorProjectIconSet.php#L221-L257","documentation":"The optional `special` attribute assigns an icon a special role. The only recognized value in this revision is \"milestone\" (PhabricatorProjectIconSet::SPECIAL_MILESTONE); any other non-null value throws, and the message lists the recognized names by imploding the valid map.","triggerScenarios":"Adding \"special\": \"default\" or \"special\": \"tag\" to an icon specification in projects.icons.","commonSituations":"Guessing attribute names, and copying config written for a Phabricator version that recognizes more special roles.","solutions":["Remove the `special` attribute, or set it to \"milestone\" on exactly the icon used for milestones.","Treat the value list in the error message as authoritative for your revision."],"exampleFix":"// before\n{\"key\":\"milestone\",\"name\":\"Milestone\",\"icon\":\"fa-flag\",\"special\":\"epic\"}\n// after\n{\"key\":\"milestone\",\"name\":\"Milestone\",\"icon\":\"fa-flag\",\"special\":\"milestone\"}","handlingStrategy":"validation","validationCode":"$valid_specials = array('milestone' => true);\nforeach ($config as $entry) {\n  $special = idx($entry, 'special');\n  if ($special !== null && empty($valid_specials[$special])) {\n    throw new Exception('unknown icon special: '.$special);\n  }\n}","typeGuard":"function is_valid_icon_special($special) {\n  return $special === null || in_array($special, array('milestone'), true);\n}","tryCatchPattern":null,"preventionTips":["Omit `special` unless the icon really is the milestone icon.","Check the recognized values in the error message for your revision before guessing."],"tags":["phabricator","configuration","project-icons","enum-validation"],"backgroundTag":"enum-validation-failed","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}