Commands
Symfony ships with a powerful console component. Just like many components in Symfony, it can also be used as a standalone component to create command-line programs. In fact, Composer (http://getcomposer.org), the dependency manager that you use every day with Symfony, has its command line-based on the Symfony Console component.
Let's find out how to create commands and what they are good for.
The initial situation
Our site users have a profile on the website. On their profile, they can upload their own picture (in any avatar). They can upload any kind of picture with different sizes and ratios, and the system will crop it and/or resize it to a square picture of 150 x 150 pixels. We always keep the higher resolution uploaded picture but pregenerate the 150-pixel one to improve the load speed of our site. Now that so many people are browsing our site from very high resolution tablets, we need to make that profile picture also available in 300 pixels size.
This is a relatively heavy task...