The Symfony2 console
To finish this chapter, let's take a look at the Symfony console script. We used it before to fire up the development server, but it offers more. Execute the following:
$ php app/console
You will see a list of supported commands. Each command has a short description. Each of the standard commands come with help, so I will not be describing each of them here, but it is worth to mention a few commonly used ones:
Command |
Description |
---|---|
|
Symfonys in production uses a lot of caching. Therefore, if you need to change values within a template (Twig) or within configuration files while in production mode, you will need to clear the cache. Cache is also one of the reasons why it's worth to work in the development mode. |
|
Displays all configured public services |
|
Displays all routing configuration along with method, scheme, host, and path. |
|
Checks your composer and packages version against known security vulnerabilities. You should run this command regularly. |
You can, of course, write your own Symfony2 commands and we will do this within the forthcoming chapters.