{"record":{"id":"bee849ee862c7811","repo":"doctrine/orm","slug":"entity-name-s-is-ambiguous-possible-matches","errorCode":null,"errorMessage":"Entity name \"%s\" is ambiguous, possible matches: \"%s\"","messagePattern":"Entity name \"(.+?)\" is ambiguous, possible matches: \"(.+?)\"","errorType":"console","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Tools/Console/Command/MappingDescribeCommand.php","lineNumber":254,"sourceCode":"        try {\n            return $entityManager->getClassMetadata($entityName);\n        } catch (MappingException) {\n        }\n\n        $matches = array_filter(\n            $this->getMappedEntities($entityManager),\n            static fn ($mappedEntity) => preg_match('{' . preg_quote($entityName) . '}', $mappedEntity),\n        );\n\n        if (! $matches) {\n            throw new InvalidArgumentException(sprintf(\n                'Could not find any mapped Entity classes matching \"%s\"',\n                $entityName,\n            ));\n        }\n\n        if (count($matches) > 1) {\n            throw new InvalidArgumentException(sprintf(\n                'Entity name \"%s\" is ambiguous, possible matches: \"%s\"',\n                $entityName,\n                implode(', ', $matches),\n            ));\n        }\n\n        return $entityManager->getClassMetadata(current($matches));\n    }\n\n    /**\n     * Format the given value for console output\n     */\n    private function formatValue(mixed $value): string\n    {\n        if ($value === '') {\n            return '';\n        }\n","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/doctrine/orm/blob/d9b9ff73016bf598ae07515f97289ce8074e97a5/src/Tools/Console/Command/MappingDescribeCommand.php#L236-L272","documentation":"Error \"Entity name \"%s\" is ambiguous, possible matches: \"%s\"\" thrown in doctrine/orm.","triggerScenarios":"Thrown at src/Tools/Console/Command/MappingDescribeCommand.php:254 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":"d9b9ff73016bf598ae07515f97289ce8074e97a5","analyzedAt":"2026-08-21T06:13:15.863Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}