-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[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
Conversation
stof
left a comment
There was a problem hiding this 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
src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php
Outdated
Show resolved
Hide resolved
|
@nicolas-grekas Is it the way to go? If yes, I'll finish this PR asap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this needs to be fixed, good catch.
The class name should be extracted from $value instead I think, after the call to $getValue().
5564059 to
d45bd61
Compare
|
I updated the PR
|
d45bd61 to
002d735
Compare
| { | ||
| public function __construct( | ||
| private Foo $foo, | ||
| private string $name = 'my-app', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this prop or can we return my-app directly in getName()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it's needed. If I hardcode the name, and revert my patch, the test pass.
|
Good catch, thanks @lyrixx. |
Uh oh!
There was an error while loading. Please reload this page.