diff --git a/src/Symfony/Bridge/Doctrine/ManagerRegistry.php b/src/Symfony/Bridge/Doctrine/ManagerRegistry.php index d602bfc2acaa..b30fd0691b1a 100644 --- a/src/Symfony/Bridge/Doctrine/ManagerRegistry.php +++ b/src/Symfony/Bridge/Doctrine/ManagerRegistry.php @@ -53,7 +53,10 @@ protected function resetService($name) } $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];