-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add services aliases to improve autowiring #279
Conversation
<service id="sylius.grid.array_to_definition_converter" class="Sylius\Component\Grid\Definition\ArrayToDefinitionConverter"> | ||
<argument type="service" id="event_dispatcher" /> | ||
</service> | ||
<service id="Sylius\Component\Grid\Definition\ArrayToDefinitionConverterInterface" alias="sylius.grid.array_to_definition_converter" /> |
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.
Why do you flip the alias when there's an interface?
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 need to keep the previous id and add the new service id with the interface.
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.
Yeah, I get that, the thing I had in mind is why not go
<service id="Sylius\Component\Grid\Definition\ArrayToDefinitionConverterInterface" class="Sylius\Component\Grid\Definition\ArrayToDefinitionConverter">
<argument type="service" id="event_dispatcher" />
</service>
<service id="sylius.grid.array_to_definition_converter" alias="Sylius\Component\Grid\Definition\ArrayToDefinitionConverterInterface" />
so the new id
is always in the service definition and the old service name is aliased.
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.
This PR was merged into the 1.12 branch. Discussion ---------- Commits ------- 2e24d47 Fix the build
8e8dd64
to
2a46e25
Compare
No description provided.