Skip to content

Commit b03f0bd

Browse files
[Bridge\Doctrine] Fix BC with DI v3.4
1 parent 1cac0a0 commit b03f0bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Bridge/Doctrine/ManagerRegistry.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,13 @@ protected function resetService($name)
4949
}
5050
$manager->setProxyInitializer(\Closure::bind(
5151
function (&$wrappedInstance, LazyLoadingInterface $manager) use ($name) {
52+
if (isset($this->normalizedIds[$normalizedId = strtolower($name)])) { // BC with DI v3.4
53+
$name = $this->normalizedIds[$normalizedId];
54+
}
5255
if (isset($this->aliases[$name])) {
5356
$name = $this->aliases[$name];
5457
}
55-
$method = $this->methodMap[$name] ?? 'get'.$name.'Service';
58+
$method = $this->methodMap[$name] ?? 'get'.strtr($name, $this->underscoreMap).'Service'; // BC with DI v3.4
5659
$wrappedInstance = $this->{$method}(false);
5760

5861
$manager->setProxyInitializer(null);

0 commit comments

Comments
 (0)