Book Image

Symfony2 Essentials

Book Image

Symfony2 Essentials

Overview of this book

Table of Contents (17 chapters)
Symfony2 Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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

app/console: cache:clear

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.

app/console container:debug

Displays all configured public services

app/console router:debug

Displays all routing configuration along with method, scheme, host, and path.

app/console security:check

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.