{"record":{"id":"9f3478c7ab9a2a89","repo":"doctrine/orm","slug":"could-not-find-any-mapped-entity-classes-matching","errorCode":null,"errorMessage":"Could not find any mapped Entity classes matching \"%s\"","messagePattern":"Could not find any mapped Entity classes matching \"(.+?)\"","errorType":"console","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Tools/Console/Command/MappingDescribeCommand.php","lineNumber":247,"sourceCode":"     *\n     * @param string $entityName Full or partial entity name\n     */\n    private function getClassMetadata(\n        string $entityName,\n        EntityManagerInterface $entityManager,\n    ): ClassMetadata {\n        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","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/doctrine/orm/blob/d9b9ff73016bf598ae07515f97289ce8074e97a5/src/Tools/Console/Command/MappingDescribeCommand.php#L229-L265","documentation":"Error \"Could not find any mapped Entity classes matching \"%s\"\" thrown in doctrine/orm.","triggerScenarios":"Thrown at src/Tools/Console/Command/MappingDescribeCommand.php:247 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"}