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

Preparing an application


There are a few steps that you should consider while preparing your application for production. It usually involves the following steps:

  1. Checking the code against debug variables or functions.

  2. Customizing error pages.

  3. Verifying the production server requirements.

  4. Verifying the application against known framework security issues.

  5. Updating the basic assets and metadata.

Let's discuss the preceding points.

Checking the code against debug code

Often, when you create your app, you are adding various debug codes to help you with debugging. Before deploying your work, it is important to verify how Symfony2 will behave in the production mode. Let's run our application and verify this. To run a built-in server in the production mode, execute the following:

$ php app/console server:run --env=prod

Now, when you run your app in the browser, you will notice that it doesn't have a web developer toolbar anymore, although the login page looks normal as usual. Let's try to log in. After you...