Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Symfony2 Essentials

You're reading from   Symfony2 Essentials

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher
ISBN-13 9781784398767
Length 158 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

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.

You have been reading a chapter from
Symfony2 Essentials
Published in: Sep 2015
Publisher:
ISBN-13: 9781784398767
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image