Skip to content

[DependencyInjection] Respect original service class when a proxy is defined #60766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 6.4
Choose a base branch
from

Conversation

lyrixx
Copy link
Member

@lyrixx lyrixx commented Jun 11, 2025

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #60765
License MIT

Copy link
Member

@stof stof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have tests preventing regressions

@@ -322,6 +322,9 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
if ($attribute instanceof AutowireCallable) {
$value = $attribute->buildDefinition($value, $type, $parameter);
} elseif ($lazy = $attribute->lazy) {
if ($this->container->has($type)) {
$type = $this->container->findDefinition($type)->getClass();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be done for the case where lazy is an array specifying the exact interfaces that should be proxied

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants