Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 19ba631

Browse filesBrowse files
committed
minor #23594 [Bridge\Doctrine] Fix BC with DI v3.4 (nicolas-grekas)
This PR was merged into the 4.0-dev branch. Discussion ---------- [Bridge\Doctrine] Fix BC with DI v3.4 | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - As allowed by composer.json. Code borrowed from branch 3.4 Commits ------- b03f0bd [Bridge\Doctrine] Fix BC with DI v3.4
2 parents b9cc089 + b03f0bd commit 19ba631
Copy full SHA for 19ba631

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎src/Symfony/Bridge/Doctrine/ManagerRegistry.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/ManagerRegistry.php
+4-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.