How can I create a new project that only uses the Symfony2 Console component?
I haven’t been able to figure out the most basic setup I would need to do, to just use the Console component (and any other must-have dependencies).
Where should I place the component files, and what do I need to include in my own code file?
The online tutorials are seriously lacking in detailed step by step explanations on how to use the various components as stand-alone components, and not as a part of the Symfony standard distribution.
Solution Found:
I’ve created a detailed step-by-step guide on how to use the Symfony 2 Console Component in your project. I hope this helps fill the documentation void.
Well one of the easiest ways would be to use
Composer. Youd set up acomposer.jsonin the root of your project and then just invokecomposer.phar installfrom the command line.Example composer.json for console:
After that you can just include the composer autoloading and you should be good to go.
That jsut gets everything set up and ready to use though… you still need to figure out how to integrate it in a way that makes sense within your project. You might actually take a look at Composer itself or Doctrine 2 for some idea of how to do that since they both use it as their console interface.
Also just some validation… you arent the only one annoyed by the lack of documentation on using the standalone components outside the full stack. 🙂