[DoctrineBridge] Use normalizedIds for resetting entity manager services

This commit is contained in:
Robin Chalas 2017-07-04 14:04:47 +02:00
parent 5de56eba9a
commit 9737bcc024

View File

@ -53,7 +53,10 @@ abstract class ManagerRegistry extends AbstractManagerRegistry implements Contai
}
$manager->setProxyInitializer(\Closure::bind(
function (&$wrappedInstance, LazyLoadingInterface $manager) use ($name) {
if (isset($this->aliases[$name = strtolower($name)])) {
if (isset($this->normalizedIds[$normalizedId = strtolower($name)])) {
$name = $this->normalizedIds[$normalizedId];
}
if (isset($this->aliases[$name])) {
$name = $this->aliases[$name];
}
$method = !isset($this->methodMap[$name]) ? 'get'.strtr($name, $this->underscoreMap).'Service' : $this->methodMap[$name];