{"record":{"id":"63dcd890ba638d04","repo":"symfony/translation","slug":"invalid-domain-s","errorCode":null,"errorMessage":"Invalid domain: \"%s\".","messagePattern":"Invalid domain: \"(.+?)\"\\.","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"Catalogue/AbstractOperation.php","lineNumber":98,"sourceCode":"                foreach ($catalogue->getDomains() as $domain) {\n                    $domains[$domain] = $domain;\n\n                    if ($catalogue->all($domainIcu = $domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX)) {\n                        $domains[$domainIcu] = $domainIcu;\n                    }\n                }\n            }\n\n            $this->domains = array_values($domains);\n        }\n\n        return $this->domains;\n    }\n\n    public function getMessages(string $domain): array\n    {\n        if (!\\in_array($domain, $this->getDomains(), true)) {\n            throw new InvalidArgumentException(\\sprintf('Invalid domain: \"%s\".', $domain));\n        }\n\n        if (!isset($this->messages[$domain][self::ALL_BATCH])) {\n            $this->processDomain($domain);\n        }\n\n        return $this->messages[$domain][self::ALL_BATCH];\n    }\n\n    public function getNewMessages(string $domain): array\n    {\n        if (!\\in_array($domain, $this->getDomains(), true)) {\n            throw new InvalidArgumentException(\\sprintf('Invalid domain: \"%s\".', $domain));\n        }\n\n        if (!isset($this->messages[$domain][self::NEW_BATCH])) {\n            $this->processDomain($domain);\n        }","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/symfony/translation/blob/ae9e8a51bc29780d63c7f9efd6005d7c875e100b/Catalogue/AbstractOperation.php#L80-L116","documentation":"Generic argument guard in AbstractOperation::getMessages(): the requested $domain string is not present in the cached list of domains collected from the source and target catalogues (including ICU domains with the +intl-icu suffix). It fires for any typo or domain that has no messages in either catalogue, as an InvalidArgumentException.","triggerScenarios":"Thrown at Catalogue/AbstractOperation.php:98 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call AbstractOperation::getDomains() (or catalogue->getDomains()) first and pick the domain from that list.","Fix the domain name typo — domains must match exactly what the catalogues contain, e.g. 'messages' or 'validators'.","Check for the ICU variant: domains may exist both as 'messages' and 'messages+intl-icu'; use the exact variant stored in the catalogue."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ae9e8a51bc29780d63c7f9efd6005d7c875e100b","analyzedAt":"2026-09-15T22:29:15.305Z","contentChangedAt":"2026-09-15T22:29:15.305Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}