-
Notifications
You must be signed in to change notification settings - Fork 15
Add service aliases #47
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
This enables the services to be DIed on type hint: `public function myAction(Request $request, HandlerFactory $handlerFactory): Response`
|
What if we do it the other way around, alias the old definitions and make the FQCN leading? I would also like to see an alias for the interface, pointing towards the implementation, this makes it possible to easily decorate (think logging/timeline for example). Additionally, can you add a test to verify if the autowiring behavior works in properly in 3.3+? This is merely to verify that the service config is written in a way it won't fail after updating. Edit: I've added a new issue specifically for the aliases (the other one is autoconfigure for the tags). |
|
Happy to switch them around, I was unsure of the preferred approach wrt BC. All my work is on 4.0.x, so yep, they're working there. But happy to run up a 3.4 site to check as well if you think it relevant. |
|
Regarding tests I mean this one: https://github.com/hostnet/form-handler-bundle/blob/master/test/Functional/Fixtures/config/config_33.yml Can you add a public class here that requires in the constructor (or optionally arguments for controller if you like):
This way we can keep the guarantee that this works. |
|
Should be GTG now! Thanks for your patience. |
|
Can you also add aliases to the interfaces? Other than that, looks good to me! |
|
Gedaan! |
|
Much appreciated. Thanks for a great bundle 👍 |
This enables the services to be DIed on type hint:
public function myAction(Request $request, HandlerFactory $handlerFactory): ResponseFixes #48