-
-
Notifications
You must be signed in to change notification settings - Fork 426
[DeadCode] Add fixture to keep constructor params with autowire attribute #7783
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
base: main
Are you sure you want to change the base?
Conversation
|
Could you provide documentation link when add autowire attribute on |
|
You mean a link like https://symfony.com/doc/current/service_container/autowiring.html?
Do you want it in the fixture? Or just here? |
|
Add to fixture is fine, move parent class under Source |
|
You could probably give the same arguments for other attributes as well: from https://symfony.com/doc/current/reference/attributes.html#dependency-injection: |
|
|
||
| namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveParentDelegatingConstructorRector\Fixture; | ||
|
|
||
| abstract class AbstractDo |
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.
|
Its hard to do it in the web interface ;) Ill come back later and do it through the IDE. |
RemoveParentDelegatingConstructorRectorremoves the constructor of classDoSomething. But the$filterLocatorparam has anautowireattribute so it doesn't just delegates the variable to the parent but it also adds metadata and I expect it to be kept as-is.