Jira issue originally created by user shurakai:
If one calls $em->getRepository('\Entity') (leading \ !) then Doctrine's behaviour is quite undefined, as it would result e.g. in a "mapping file '.entity.dcm.yml' not found" error. (leading dot!)
PHP, however, seems to allow the leading \, but Doctrine does not. In fact, the leading \ is not necessary as classnames in strings are always fully qualified.
So Doctrine should either:
1.) Throw an exception stating that using a leading backslash is prohibited
2.) Simply strip it.
Comment created by @beberlei:
I vote for 1. Stripping the char just leads to major overhead given that getMetadataFor is one of the most called functions in Doctrine 2.
Comment created by romanb:
Issue was closed with resolution "Fixed"