Skip to content
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

make commands services #52

Closed
lsmith77 opened this issue Mar 1, 2018 · 5 comments
Closed

make commands services #52

lsmith77 opened this issue Mar 1, 2018 · 5 comments

Comments

@lsmith77
Copy link
Collaborator

lsmith77 commented Mar 1, 2018

https://symfony.com/doc/current/console/commands_as_services.html

@stefandoorn
Copy link
Member

Added PR (#58). Downside is that the exporter command requires the container at this moment to get the proper repository. Probably would be nice to have a command instance that can have the proper repository injected, but that might be next improvement. Not sure if we can do that just with the services.yml we currently have (maybe via a factory or smth) or that we need to use compiler passes for it.

@lsmith77
Copy link
Collaborator Author

lsmith77 commented Mar 4, 2018

we can use this symfony/symfony#21553

@stefandoorn
Copy link
Member

How would that look in practice?

@lsmith77 lsmith77 closed this as completed Mar 4, 2018
@lsmith77 lsmith77 reopened this Mar 4, 2018
@lsmith77
Copy link
Collaborator Author

lsmith77 commented Mar 4, 2018

we would inject a service locator service, which would be define dynamically with all the exporter services.

@lsmith77
Copy link
Collaborator Author

lsmith77 commented Mar 5, 2018

I created #74 for the switch to service locator

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

No branches or pull requests

2 participants