-
Notifications
You must be signed in to change notification settings - Fork 43
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
find a way to avoid ->add()s every command, rather do something like symfony loads all of them #49
Comments
read again @matthiasnoback's http://php-and-symfony.matthiasnoback.nl/2013/10/symfony2-console-commands-as-services-why/ blog post and decided for keeping my clean-code eyes bright for now. |
Well, as far as I know there's no way to circumvent loading all commands. It's necessary to find out what their names are at least. If you make the commands themselves services and their constructor arguments lazy, this will not automatically instantiate all the injected services. Of course, making them |
@matthiasnoback i think is an interesting optimization, i think there is a way, to basically map an array and basically do either reflection or better match the name of the class to whatever needs to be loaded. I would very much like to see Gush going CAS and also abstracting more its base so that soon we can make it fully DDD and leave symfony component if need be. |
Well, I think that would be great. By the way, did you try Aura.Cli? It has some nice things in it. If your code is decoupled from the framework, you could switch to that easily. See also what Paul Jones wrote about this kind of approach: http://paul-m-jones.com/archives/5921 |
yeah @pmjones and I sat at SunshinePHP to talk about this 👯 but yeah it is a wonderful topic to talk, we should gather somewhere soonish |
No description provided.
The text was updated successfully, but these errors were encountered: